diff options
author | Aleix Pol <aleixpol@kde.org> | 2016-04-19 16:05:35 +0200 |
---|---|---|
committer | Aleix Pol <aleixpol@codereview.qt-project.org> | 2016-05-11 12:42:08 +0000 |
commit | bc750f8f77072b0279fea1e59601c56969a67df5 (patch) | |
tree | 47bec151b8eac20afba46bb4ede1309740601a8e | |
parent | 0e00f9fa1cbdbdd2128f2ca31172d88f701ecb59 (diff) | |
download | qtquickcontrols-bc750f8f77072b0279fea1e59601c56969a67df5.tar.gz |
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 <albert.astals@canonical.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | src/controls/Label.qml | 6 |
1 files changed, 1 insertions, 5 deletions
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 } |