From bc750f8f77072b0279fea1e59601c56969a67df5 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 19 Apr 2016 16:05:35 +0200 Subject: Save some time and memory by using the SystemPalette singleton Instead of instantiating a SystemPalette object for every Label, re-use the singleton, which is already designed for this. Change-Id: I7356fc983ea6dcd4dad0207c41ae1e0ba07dace4 Reviewed-by: Albert Astals Cid Reviewed-by: J-P Nurmi --- src/controls/Label.qml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/controls/Label.qml b/src/controls/Label.qml index b07e96d7..7174b282 100644 --- a/src/controls/Label.qml +++ b/src/controls/Label.qml @@ -81,13 +81,9 @@ Text { */ id: label - color: pal.windowText + color: SystemPaletteSingleton.windowText(enabled) activeFocusOnTab: false renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering - SystemPalette { - id: pal - colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled - } Accessible.name: text Accessible.role: Accessible.StaticText } -- cgit v1.2.1