diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-04 12:54:38 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-09 11:43:49 +0000 |
commit | 372c5b44e5bc2730c3557cf56bffc5496ab020f3 (patch) | |
tree | 02ff1d36bdbd9bb6544fa5f21728dcfa5f9b404e /src/imports/controls/ComboBox.qml | |
parent | befe5e0dca3b5af7ffa48b0f66794b083d43656f (diff) |
Add QQuickComboBox::down
This allows us to replace all "control.pressed || popup.visible"
expressions with "control.down", and takes us one step closer to
deferred popop execution as mentioned in the previous commit. In
order to be able to defer the popup execution, we must get rid of
such explicit references to the popup.
Change-Id: Ifa7ecf8201912d3ec1bca232e2cf600e3886715e
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/ComboBox.qml')
-rw-r--r-- | src/imports/controls/ComboBox.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 720bb534..6c85dd58 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -38,7 +38,7 @@ import QtQuick 2.8 import QtQuick.Window 2.2 import QtQuick.Controls 2.1 import QtQuick.Controls.impl 2.1 -import QtQuick.Templates 2.1 as T +import QtQuick.Templates 2.2 as T T.ComboBox { id: control @@ -97,7 +97,7 @@ T.ComboBox { implicitHeight: 40 color: control.visualFocus ? (control.pressed ? Default.focusPressedColor : Default.focusLightColor) : - (control.pressed || popup.visible ? Default.buttonPressedColor : Default.buttonColor) + (control.down ? Default.buttonPressedColor : Default.buttonColor) border.color: Default.focusColor border.width: control.visualFocus ? 2 : 0 visible: !control.flat || control.pressed |