@@ -59,13 +59,9 @@ Item {
59 id: column
59 id: column
60 width: parent.width
60 width: parent.width
62− // TODO: check if SDK ListItems could be used here
62+ ListItem.Standard {
63− // and if not make them be useful since this is a quite common pattern
66 id: backButton
63 id: backButton
67 objectName: "backButton"
64 objectName: "backButton"
69 visible: navigation && !navigation.isRoot || false
65 visible: navigation && !navigation.isRoot || false
70 height: itemHeight
66 height: itemHeight
@@ -98,25 +94,11 @@ Item {
98 maximumLineCount: 2
94 maximumLineCount: 2
99 elide: Text.ElideMiddle
95 elide: Text.ElideMiddle
104− bottom: parent.bottom
107− leftMargin: units.gu(2)
108− rightMargin: units.gu(2)
110− color: root.foregroundColor
116− AbstractButton {
99+ ListItem.Standard {
117 id: allButton
100 id: allButton
118 objectName: "allButton"
101 objectName: "allButton"
120 visible: navigation && (!navigation.isRoot || (!navigation.hidden && root.currentNavigation && !root.currentNavigation.isRoot && root.currentNavigation.parentNavigationId == navigation.navigationId)) || false
102 visible: navigation && (!navigation.isRoot || (!navigation.hidden && root.currentNavigation && !root.currentNavigation.isRoot && root.currentNavigation.parentNavigationId == navigation.navigationId)) || false
121 height: itemHeight
103 height: itemHeight
@@ -136,19 +118,6 @@ Item {
136 elide: Text.ElideMiddle
118 elide: Text.ElideMiddle
141− bottom: parent.bottom
144− leftMargin: units.gu(2)
145− rightMargin: units.gu(2)
147− color: root.foregroundColor
152 onClicked: root.allNavigationClicked();
121 onClicked: root.allNavigationClicked();
@@ -158,13 +127,7 @@ Item {
158 delegate: ListItem.Standard {
127 delegate: ListItem.Standard {
159 objectName: root.objectName + "child" + index
128 objectName: root.objectName + "child" + index
160 height: root.itemHeight
129 height: root.itemHeight
164− leftMargin: units.gu(2)
165− rightMargin: units.gu(2)
167− showDivider: false
130+ showDivider: index != navigation.count - 1
168 selected: isActive
131 selected: isActive
170 onClicked: root.enterNavigation(navigationId, hasChildren)
133 onClicked: root.enterNavigation(navigationId, hasChildren)
@@ -173,8 +136,9 @@ Item {
173 anchors {
136 anchors {
174 verticalCenter: parent.verticalCenter
137 verticalCenter: parent.verticalCenter
175 left: parent.left
138 left: parent.left
139+ leftMargin: units.gu(2)
176 right: rightIcon.visible ? rightIcon.left : parent.right
140 right: rightIcon.visible ? rightIcon.left : parent.right
177− rightMargin: rightIcon.visible ? units.gu(0.5) : 0
141+ rightMargin: rightIcon.visible ? units.gu(0.5) : units.gu(2)
179 text: label
143 text: label
180 color: root.foregroundColor
144 color: root.foregroundColor
@@ -188,6 +152,7 @@ Item {
188 anchors {
152 anchors {
189 verticalCenter: parent.verticalCenter
153 verticalCenter: parent.verticalCenter
190 right: parent.right
154 right: parent.right
155+ rightMargin: units.gu(2)
192 height: units.gu(2)
157 height: units.gu(2)
193 width: height
158 width: height
@@ -195,18 +160,6 @@ Item {
195 color: root.foregroundColor
160 color: root.foregroundColor
196 visible: hasChildren || isActive
161 visible: hasChildren || isActive
201− bottom: parent.bottom
205− color: root.foregroundColor
208− visible: index != navigation.count - 1