From 541d459c6fce2f6a6924ff408a7b903cbef01cbc Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Wed, 23 Aug 2017 09:28:22 +0200 Subject: people: use AbstractButton --- framework/qml/People.qml | 22 +++++++++++++--------- 1 file 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 { height: gridView.cellHeight - Kube.Units.smallSpacing * 2 width: gridView.cellWidth - Kube.Units.smallSpacing * 2 - MouseArea { - anchors.fill: parent - onClicked: { - parent.GridView.view.currentIndex = index - parent.GridView.view.selectObject(model.domainObject) - } - } Keys.onReturnPressed: { GridView.view.currentIndex = index GridView.view.selectObject(model.domainObject) @@ -142,8 +135,8 @@ FocusScope { Rectangle { anchors.fill: parent - border.width: parent.GridView.view.currentIndex == index ? 2 : 1 - border.color: parent.GridView.view.currentIndex == index ? Kube.Colors.highlightColor : Kube.Colors.buttonColor + border.width: 1 + border.color: Kube.Colors.buttonColor Rectangle { id: avatarPlaceholder @@ -191,6 +184,17 @@ FocusScope { } } } + Kube.AbstractButton { + + anchors.fill: parent + + color: "#00000000" + + onClicked: { + parent.GridView.view.currentIndex = index + parent.GridView.view.selectObject(model.domainObject) + } + } } } } -- cgit v1.2.3