diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-23 09:28:22 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-08-23 09:28:22 +0200 |
commit | 541d459c6fce2f6a6924ff408a7b903cbef01cbc (patch) | |
tree | 1554e7b9512b856c0f528c912665da52ec33a1fd | |
parent | 9bf5caceac5b999f8dcd5ed46cac21b52f63cf64 (diff) | |
download | kube-541d459c6fce2f6a6924ff408a7b903cbef01cbc.tar.gz kube-541d459c6fce2f6a6924ff408a7b903cbef01cbc.zip |
people: use AbstractButton
-rw-r--r-- | framework/qml/People.qml | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/framework/qml/People.qml b/framework/qml/People.qml index ef70eba9..2029dc69 100644 --- a/framework/qml/People.qml +++ b/framework/qml/People.qml | |||
@@ -127,13 +127,6 @@ FocusScope { | |||
127 | height: gridView.cellHeight - Kube.Units.smallSpacing * 2 | 127 | height: gridView.cellHeight - Kube.Units.smallSpacing * 2 |
128 | width: gridView.cellWidth - Kube.Units.smallSpacing * 2 | 128 | width: gridView.cellWidth - Kube.Units.smallSpacing * 2 |
129 | 129 | ||
130 | MouseArea { | ||
131 | anchors.fill: parent | ||
132 | onClicked: { | ||
133 | parent.GridView.view.currentIndex = index | ||
134 | parent.GridView.view.selectObject(model.domainObject) | ||
135 | } | ||
136 | } | ||
137 | Keys.onReturnPressed: { | 130 | Keys.onReturnPressed: { |
138 | GridView.view.currentIndex = index | 131 | GridView.view.currentIndex = index |
139 | GridView.view.selectObject(model.domainObject) | 132 | GridView.view.selectObject(model.domainObject) |
@@ -142,8 +135,8 @@ FocusScope { | |||
142 | Rectangle { | 135 | Rectangle { |
143 | anchors.fill: parent | 136 | anchors.fill: parent |
144 | 137 | ||
145 | border.width: parent.GridView.view.currentIndex == index ? 2 : 1 | 138 | border.width: 1 |
146 | border.color: parent.GridView.view.currentIndex == index ? Kube.Colors.highlightColor : Kube.Colors.buttonColor | 139 | border.color: Kube.Colors.buttonColor |
147 | 140 | ||
148 | Rectangle { | 141 | Rectangle { |
149 | id: avatarPlaceholder | 142 | id: avatarPlaceholder |
@@ -191,6 +184,17 @@ FocusScope { | |||
191 | } | 184 | } |
192 | } | 185 | } |
193 | } | 186 | } |
187 | Kube.AbstractButton { | ||
188 | |||
189 | anchors.fill: parent | ||
190 | |||
191 | color: "#00000000" | ||
192 | |||
193 | onClicked: { | ||
194 | parent.GridView.view.currentIndex = index | ||
195 | parent.GridView.view.selectObject(model.domainObject) | ||
196 | } | ||
197 | } | ||
194 | } | 198 | } |
195 | } | 199 | } |
196 | } | 200 | } |