~bhdouglass/ubuntu-touch-tweak-tool/fix-disappearing-options

« back to all changes in this revision

Viewing changes to src/app/qml/components/ListItems/SectionDivider.qml

  • Committer: Stefano Verzegnassi
  • Date: 2016-04-16 17:04:08 UTC
  • Revision ID: stefano92.100@gmail.com-20160416170408-t0ck3hoi0qifmehw
Stable codebase for 0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.4
2
2
import Ubuntu.Components 1.3
3
 
import Ubuntu.Components.ListItems 1.3 as ListItems
4
3
 
5
4
Rectangle {
 
5
    id: rootItem
 
6
 
6
7
    property alias text: sectionLabel.text
7
 
    property alias showDivider: divider.visible
8
8
    property alias iconName: icon.name
9
9
 
10
 
    anchors {
11
 
        left: parent.left
12
 
        right: parent.right
13
 
    }
 
10
    anchors { left: parent.left; right: parent.right }
 
11
    height: units.gu(4)
14
12
 
15
 
    height: sectionLabel.height + units.gu(2)
16
 
    color: Theme.palette.normal.background
 
13
    color: theme.palette.normal.foreground
17
14
 
18
15
    Row {
19
16
        anchors {
20
17
            left: parent.left
21
 
            leftMargin: units.gu(2)
22
18
            right: parent.right
23
 
            rightMargin: units.gu(2)
24
 
            bottom: divider.top
 
19
            margins: units.gu(2)
 
20
            verticalCenter: parent.verticalCenter
25
21
        }
26
 
        height: units.gu(4)
27
22
        spacing: units.gu(1)
28
23
 
29
24
        Icon {
31
26
            height: units.gu(2)
32
27
            width: name ? units.gu(2) : 0
33
28
            anchors.verticalCenter: parent.verticalCenter
34
 
            color: UbuntuColors.orange
35
29
        }
36
30
 
37
31
        Label {
38
32
            id: sectionLabel
39
 
            height: parent.height
40
 
            fontSize: "medium"
41
 
            //font.weight: Font.DemiBold
42
 
            verticalAlignment: Text.AlignVCenter
43
 
            color: UbuntuColors.orange
 
33
            anchors.verticalCenter: parent.verticalCenter
44
34
        }
45
35
    }
46
36
 
47
 
    ListItems.ThinDivider {
48
 
        id: divider
 
37
    Rectangle {
49
38
        anchors {
50
39
            left: parent.left
51
40
            right: parent.right
52
41
            bottom: parent.bottom
53
42
        }
 
43
 
 
44
        height: units.dp(2)
 
45
        gradient: Gradient {
 
46
            GradientStop { position: 0.0;  color: Qt.rgba(0, 0, 0, 0.1) }
 
47
            GradientStop { position: 0.49; color: Qt.rgba(0, 0, 0, 0.1) }
 
48
            GradientStop { position: 0.5;  color: Qt.rgba(1, 1, 1, 0.4) }
 
49
            GradientStop { position: 1.0;  color: Qt.rgba(1, 1, 1, 0.4) }
 
50
        }
54
51
    }
55
52
}