aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/ComboBox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/ComboBox.qml')
-rw-r--r--src/imports/controls/ComboBox.qml29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 6a885320..289c321f 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.9
+import QtQuick 2.10
import QtQuick.Window 2.3
-import QtQuick.Controls 2.2
-import QtQuick.Controls.impl 2.2
-import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
T.ComboBox {
id: control
@@ -61,12 +61,11 @@ T.ComboBox {
hoverEnabled: control.hoverEnabled
}
- indicator: Image {
+ indicator: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- source: "image://default/double-arrow/" + (!control.editable && control.visualFocus ? Default.focusColor : Default.textColor)
- sourceSize.width: width
- sourceSize.height: height
+ color: !control.editable && control.visualFocus ? control.palette.highlight : undefined
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/double-arrow.png"
opacity: enabled ? 1 : 0.3
}
@@ -85,27 +84,26 @@ T.ComboBox {
validator: control.validator
font: control.font
- color: !control.editable && control.visualFocus ? Default.focusColor : Default.textColor
- selectionColor: Default.focusColor
- selectedTextColor: Default.textLightColor
+ color: !control.editable && control.visualFocus ? control.palette.highlight : control.palette.text
+ selectionColor: control.palette.highlight
+ selectedTextColor: control.palette.highlightedText
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- opacity: control.enabled ? 1 : 0.3
background: Rectangle {
visible: control.editable && !control.flat
border.width: parent && parent.activeFocus ? 2 : 1
- border.color: parent && parent.activeFocus ? Default.focusColor : Default.buttonColor
+ border.color: parent && parent.activeFocus ? control.palette.highlight : Default.buttonColor
}
}
background: Rectangle {
- implicitWidth: 120
+ implicitWidth: 140
implicitHeight: 40
color: !control.editable && control.visualFocus ? (control.pressed ? Default.focusPressedColor : Default.focusLightColor) :
(control.down || popup.visible ? Default.buttonPressedColor : Default.buttonColor)
- border.color: Default.focusColor
+ border.color: control.palette.highlight
border.width: !control.editable && control.visualFocus ? 2 : 0
visible: !control.flat || control.down
}
@@ -122,7 +120,6 @@ T.ComboBox {
implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
- highlightRangeMode: ListView.ApplyRange
highlightMoveDuration: 0
Rectangle {