on xenial help sign in
Added touch state on navigation
commit24d41f3aac01c297a7b551a14d20337e01d3a27d authorhandsome_feng <445865575@qq.com> dateFri 19 Jun 2015, 11:40 (11 years ago) parentbba3243
1 file changed+11−7
qml/Dash/DashNavigationList.qml+11−7
qml/Dash/DashNavigationList.qml+11−7
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.2
1818import Ubuntu.Components 1.1
19+import Ubuntu.Components.ListItems 0.1 as ListItem
1920import "../Components"
2021
2122Item {
@@ -154,10 +155,17 @@ Item {
154155 Repeater {
155156 model: navigation && navigation.loaded ? navigation : null
156157 clip: true
157− delegate: AbstractButton {
158+ delegate: ListItem.Standard {
158159 objectName: root.objectName + "child" + index
159160 height: root.itemHeight
160− width: root.width
161+ anchors {
162+ left: parent.left
163+ right: parent.right
164+ leftMargin: units.gu(2)
165+ rightMargin: units.gu(2)
166+ }
167+ showDivider: false
168+ selected: isActive
161169
162170 onClicked: root.enterNavigation(navigationId, hasChildren)
163171
@@ -165,9 +173,8 @@ Item {
165173 anchors {
166174 verticalCenter: parent.verticalCenter
167175 left: parent.left
168− leftMargin: units.gu(2)
169176 right: rightIcon.visible ? rightIcon.left : parent.right
170− rightMargin: rightIcon.visible ? units.gu(0.5) : units.gu(2)
177+ rightMargin: rightIcon.visible ? units.gu(0.5) : 0
171178 }
172179 text: label
173180 color: root.foregroundColor
@@ -181,7 +188,6 @@ Item {
181188 anchors {
182189 verticalCenter: parent.verticalCenter
183190 right: parent.right
184− rightMargin: units.gu(2)
185191 }
186192 height: units.gu(2)
187193 width: height
@@ -195,8 +201,6 @@ Item {
195201 bottom: parent.bottom
196202 left: parent.left
197203 right: parent.right
198− leftMargin: units.gu(2)
199− rightMargin: units.gu(2)
200204 }
201205 color: root.foregroundColor
202206 opacity: 0.1