~3v1n0/unity8/indicators-client-modernize

« back to all changes in this revision

Viewing changes to qml/Dash/DashNavigationList.qml

  • Committer: Marco Trevisan (Treviño)
  • Date: 2016-09-08 16:48:59 UTC
  • mfrom: (2445.1.4 fake-indicators-model)
  • Revision ID: mail@3v1n0.net-20160908164859-9m8cqbb2ra0s02l6
Merging with lp:~3v1n0/unity8/fake-indicators-model

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
            Repeater {
54
54
                model: navigation && navigation.loaded ? navigation : null
55
55
                clip: true
56
 
                // FIXME Move to ListItem (and remove import) once 1556971 is fixed
57
 
                delegate: ListItems.Empty {
58
 
                    objectName: root.objectName + "child" + index
 
56
                delegate: Loader {
 
57
                    asynchronous: true
59
58
                    height: root.itemHeight
60
59
                    width: column.width
61
 
                    anchors {
62
 
                        left: column.left
63
 
                        right: column.right
64
 
                        leftMargin: units.gu(2)
65
 
                        rightMargin: units.gu(2)
66
 
                    }
67
 
 
68
 
                    onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
69
 
 
70
 
                    Icon {
71
 
                        id: leftIcon
 
60
                    // FIXME Move to ListItem (and remove import) once 1556971 is fixed
 
61
                    sourceComponent: ListItems.Empty {
 
62
                        objectName: root.objectName + "child" + index
72
63
                        anchors {
73
 
                            verticalCenter: parent.verticalCenter
74
64
                            left: parent.left
75
 
                        }
76
 
                        height: units.gu(2)
77
 
                        width: height
78
 
                        name: "tick"
79
 
                        color: "#3EB34F"
80
 
                        visible: isActive
81
 
                    }
82
 
 
83
 
                    Label {
84
 
                        anchors {
85
 
                            verticalCenter: parent.verticalCenter
86
 
                            left: leftIcon.right
87
 
                            leftMargin: units.gu(1)
88
 
                            right: rightIcon.left
 
65
                            right: parent.right
 
66
                            leftMargin: units.gu(2)
89
67
                            rightMargin: units.gu(2)
90
68
                        }
91
 
                        text: label
92
 
                        color: isActive ? "#333333" : "#888888"
93
 
                        wrapMode: Text.Wrap
94
 
                        maximumLineCount: 2
95
 
                        elide: Text.ElideMiddle
96
 
                    }
97
 
 
98
 
                    Icon {
99
 
                        id: rightIcon
100
 
                        anchors {
101
 
                            verticalCenter: parent.verticalCenter
102
 
                            right: parent.right
103
 
                        }
104
 
                        height: units.gu(2)
105
 
                        width: height
106
 
                        name: "go-next"
107
 
                        visible: hasChildren
108
 
                    }
109
 
 
110
 
                    divider.visible: index != navigation.count - 1
 
69
 
 
70
                        onClicked: root.enterNavigation(navigationId, allLabel != "" ? allLabel : label, hasChildren)
 
71
 
 
72
                        Icon {
 
73
                            id: leftIcon
 
74
                            anchors {
 
75
                                verticalCenter: parent.verticalCenter
 
76
                                left: parent.left
 
77
                            }
 
78
                            height: units.gu(2)
 
79
                            width: height
 
80
                            name: "tick"
 
81
                            color: "#3EB34F"
 
82
                            visible: isActive
 
83
                        }
 
84
 
 
85
                        Label {
 
86
                            anchors {
 
87
                                verticalCenter: parent.verticalCenter
 
88
                                left: leftIcon.right
 
89
                                leftMargin: units.gu(1)
 
90
                                right: rightIcon.left
 
91
                                rightMargin: units.gu(2)
 
92
                            }
 
93
                            text: label
 
94
                            color: isActive ? "#333333" : "#888888"
 
95
                            wrapMode: Text.Wrap
 
96
                            maximumLineCount: 2
 
97
                            elide: Text.ElideMiddle
 
98
                        }
 
99
 
 
100
                        Icon {
 
101
                            id: rightIcon
 
102
                            anchors {
 
103
                                verticalCenter: parent.verticalCenter
 
104
                                right: parent.right
 
105
                            }
 
106
                            height: units.gu(2)
 
107
                            width: height
 
108
                            name: "go-next"
 
109
                            visible: hasChildren
 
110
                        }
 
111
 
 
112
                        divider.visible: index != navigation.count - 1
 
113
                    }
111
114
                }
112
115
            }
113
116
        }