diff options
author | Mitch Curtis <mitch.curtis@theqtcompany.com> | 2016-04-12 16:19:58 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-04-15 14:45:47 +0000 |
commit | eae24fccc57437170e2ba01b894fa24fe65292be (patch) | |
tree | dfbd1450c237df8c2cd08838d2f054ef029ceea8 /src/imports/controls/material/RadioIndicator.qml | |
parent | 0fe0283308199a6bf4a155627cddd524638c7063 (diff) |
Add QQuickAbstractButton::down
This property will determine whether or not the button is visually
pressed. Having such a distinction allows users more control over their
controls.
The patch also fixes the problem with ComboBox where pressing on the
ComboBox when it's open would cause a delegate in the popup to show as
being pressed.
Unless explicitly set, this property follows the value of the pressed
property. To return to the default value, set it to undefined.
Change-Id: I29ecf325ed2ede125613f0c878b0427937599866
Task-number: QTBUG-51005
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/material/RadioIndicator.qml')
-rw-r--r-- | src/imports/controls/material/RadioIndicator.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/controls/material/RadioIndicator.qml b/src/imports/controls/material/RadioIndicator.qml index 5ad92c3d..27ab8d9a 100644 --- a/src/imports/controls/material/RadioIndicator.qml +++ b/src/imports/controls/material/RadioIndicator.qml @@ -43,7 +43,7 @@ Rectangle { implicitHeight: 20 radius: width / 2 border.width: 2 - border.color: control.checked || control.pressed ? control.Material.accentColor : control.Material.secondaryTextColor + border.color: control.checked || control.down ? control.Material.accentColor : control.Material.secondaryTextColor color: "transparent" property alias control: ripple.control @@ -54,7 +54,7 @@ Rectangle { height: width control: control colored: control.checked - opacity: control.pressed || control.activeFocus ? 1 : 0 + opacity: control.down || control.activeFocus ? 1 : 0 } Rectangle { @@ -64,6 +64,6 @@ Rectangle { height: 10 radius: width / 2 color: parent.border.color - visible: control.checked || control.pressed + visible: control.checked || control.down } } |