From f0697c622ab087faa19679725250c0ac7f79372d Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 30 Aug 2017 13:29:00 +0200 Subject: 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 --- src/imports/controls/CheckIndicator.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/controls/CheckIndicator.qml') 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 } -- cgit v1.2.3