From 4aa457b4daa5b678a6fe0e716c8b495f3f7d5f04 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 26 Jul 2017 12:55:35 -0600 Subject: Use the DelegateBackground also for buttons --- framework/qml/AbstractButton.qml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'framework') diff --git a/framework/qml/AbstractButton.qml b/framework/qml/AbstractButton.qml index 28337681..c49a490b 100644 --- a/framework/qml/AbstractButton.qml +++ b/framework/qml/AbstractButton.qml @@ -40,23 +40,11 @@ T.Button { hoverEnabled: true Keys.onReturnPressed: root.clicked() - background: Rectangle { + background: DelegateBackground { + selected: root.checked + focused: root.hovered || root.visualFocus color: root.color - Rectangle { - anchors.fill: parent - visible: root.checked - color: Colors.highlightColor - } - - Rectangle { - anchors.fill: parent - visible: root.hovered || root.visualFocus - color: "transparent" - border.width: 2 - border.color: Colors.focusedButtonColor - } - Rectangle { anchors.fill: parent visible: root.pressed -- cgit v1.2.3