diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-09-08 10:29:57 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-09-12 08:27:37 +0000 |
commit | 2bdf059e6e62fda8e1df108f0a68651e546b0f67 (patch) | |
tree | f7b3bdf8a5b61814b827217bf3ad66e8879cd670 /src/imports/controls/ItemDelegate.qml | |
parent | 86180aed5008779b1b94731d9b4c6b1fdac8f3d3 (diff) |
Default: consolidate style colors into a singleton
This reduces all of the duplicate literals that we currently have.
Task-number: QTBUG-55867
Change-Id: I28f1f646d25f2f6578d52b4ba96f8f0f3ad6706b
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/controls/ItemDelegate.qml')
-rw-r--r-- | src/imports/controls/ItemDelegate.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml index 7ef41723..98b6c617 100644 --- a/src/imports/controls/ItemDelegate.qml +++ b/src/imports/controls/ItemDelegate.qml @@ -35,6 +35,8 @@ ****************************************************************************/ import QtQuick 2.6 +import QtQuick.Controls 2.1 +import QtQuick.Controls.impl 2.1 import QtQuick.Templates 2.1 as T T.ItemDelegate { @@ -57,7 +59,7 @@ T.ItemDelegate { text: control.text font: control.font - color: control.enabled ? "#26282a" : "#bdbebf" + color: control.enabled ? Default.textDarkColor : Default.textDisabledColor elide: Text.ElideRight visible: control.text horizontalAlignment: Text.AlignLeft @@ -70,7 +72,9 @@ T.ItemDelegate { implicitWidth: 100 implicitHeight: 40 visible: control.down || control.highlighted || control.visualFocus - color: control.visualFocus ? (control.pressed ? "#cce0ff" : "#e5efff") : (control.down ? "#bdbebf" : "#eeeeee") + color: control.visualFocus + ? (control.pressed ? Default.focusPressedColor : Default.delegateFocusColor) + : (control.down ? Default.delegatePressedColor : Default.delegateColor) } //! [background] } |