aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/CheckIndicator.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/CheckIndicator.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/CheckIndicator.qml')
-rw-r--r--src/imports/controls/CheckIndicator.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/CheckIndicator.qml b/src/imports/controls/CheckIndicator.qml
index 2bc87fe6..a3137ff1 100644
--- a/src/imports/controls/CheckIndicator.qml
+++ b/src/imports/controls/CheckIndicator.qml
@@ -58,7 +58,7 @@ Rectangle {
ColorImage {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
- color: control.visualFocus ? Default.focusColor : Default.textColor
+ color: control.visualFocus ? Default.focusColor : undefined
source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png"
visible: control.checkState === Qt.Checked
}