diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 05:33:24 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-21 05:33:24 +0200 |
commit | 0fd0d8ce5f91c037e12e4d61f05d66437eb4088b (patch) | |
tree | 015425c563bb667a4eddc282e95692c858879a44 /framework/qml/PositiveButton.qml | |
parent | a5e8d20f23a7ee951b8db4166eb0ad68a8bdf0e0 (diff) | |
download | kube-0fd0d8ce5f91c037e12e4d61f05d66437eb4088b.tar.gz kube-0fd0d8ce5f91c037e12e4d61f05d66437eb4088b.zip |
Return pressed & activeFocus
Diffstat (limited to 'framework/qml/PositiveButton.qml')
-rw-r--r-- | framework/qml/PositiveButton.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/qml/PositiveButton.qml b/framework/qml/PositiveButton.qml index aa134d15..4293d082 100644 --- a/framework/qml/PositiveButton.qml +++ b/framework/qml/PositiveButton.qml | |||
@@ -32,12 +32,13 @@ T.Button { | |||
32 | 32 | ||
33 | clip: true | 33 | clip: true |
34 | hoverEnabled: true | 34 | hoverEnabled: true |
35 | Keys.onReturnPressed: root.clicked() | ||
35 | 36 | ||
36 | background: Rectangle { | 37 | background: Rectangle { |
37 | color: Colors.positiveColor | 38 | color: Colors.positiveColor |
38 | 39 | ||
39 | border.width: 2 | 40 | border.width: 2 |
40 | border.color: root.focus && !root.pressed ? Colors.highlightColor : Colors.positiveColor | 41 | border.color: root.activeFocus && !root.pressed ? Colors.highlightColor : Colors.positiveColor |
41 | 42 | ||
42 | Rectangle { | 43 | Rectangle { |
43 | anchors.fill: parent | 44 | anchors.fill: parent |
@@ -49,7 +50,7 @@ T.Button { | |||
49 | 50 | ||
50 | contentItem: Label { | 51 | contentItem: Label { |
51 | text: root.text | 52 | text: root.text |
52 | font.underline: root.focus | 53 | font.underline: root.activeFocus |
53 | elide: Text.ElideRight | 54 | elide: Text.ElideRight |
54 | horizontalAlignment: Text.AlignHCenter | 55 | horizontalAlignment: Text.AlignHCenter |
55 | verticalAlignment: Text.AlignVCenter | 56 | verticalAlignment: Text.AlignVCenter |