aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/ComboBox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-08-30 13:29:00 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-08-30 12:29:25 +0000
commitf0697c622ab087faa19679725250c0ac7f79372d (patch)
tree1352e89c391404af361ef2949b7c0ac9da27ca7e /src/imports/controls/ComboBox.qml
parent31d90e308e46d644d74e9434ce31dd664677bc59 (diff)
ColorImage: colorize only if needed
QQuickColorImageProvider got replaced by QQuickColorImage in 9fc3659. This seems to have introduced a performance regression in several controls that are now colorizing images even when there's no need to. Various indicator images have the correct default color that matches the normal state. They need to be colorized only when gaining focus or being disabled, for example. The improvement in qmlbench results: - CheckBox: 70 => 84 frames - ComboBox: 88 => 92 frames - Dial: 73 => 77 frames - MenuItem: 73 => 84 frames Change-Id: I9155042542f5069cff201a1730b9dd2a62cffd67 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/ComboBox.qml')
-rw-r--r--src/imports/controls/ComboBox.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index a3735880..2c834d8d 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -64,7 +64,7 @@ T.ComboBox {
indicator: ColorImage {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
- color: !control.editable && control.visualFocus ? Default.focusColor : Default.textColor
+ color: !control.editable && control.visualFocus ? Default.focusColor : undefined
source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/double-arrow.png"
opacity: enabled ? 1 : 0.3
}