summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Desktop
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-06-25 10:27:39 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-06-25 10:27:39 +0200
commit91caf7531476d16c1c7a6d22705cb36ac93c5ab7 (patch)
treee4f67bcd61c55ba2b8cb4a4d01b10f69837c74e8 /src/controls/Styles/Desktop
parent1f0def9e8feca180680c1344cef6cf250b7630ba (diff)
parent6b876b21cd23f2af879543edf773dac41b4d0e97 (diff)
downloadqtquickcontrols-91caf7531476d16c1c7a6d22705cb36ac93c5ab7.tar.gz
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts: .qmake.conf src/controls/Styles/Desktop/SpinBoxStyle.qml Change-Id: Ia501c1388a2af9f273ec2742abbfc766717ad9e6
Diffstat (limited to 'src/controls/Styles/Desktop')
-rw-r--r--src/controls/Styles/Desktop/CheckBoxStyle.qml2
-rw-r--r--src/controls/Styles/Desktop/MenuStyle.qml2
-rw-r--r--src/controls/Styles/Desktop/RadioButtonStyle.qml2
-rw-r--r--src/controls/Styles/Desktop/SpinBoxStyle.qml13
-rw-r--r--src/controls/Styles/Desktop/TableViewStyle.qml6
-rw-r--r--src/controls/Styles/Desktop/TextAreaStyle.qml8
-rw-r--r--src/controls/Styles/Desktop/TextFieldStyle.qml13
7 files changed, 15 insertions, 31 deletions
diff --git a/src/controls/Styles/Desktop/CheckBoxStyle.qml b/src/controls/Styles/Desktop/CheckBoxStyle.qml
index 7a4c4639..4fb7d47a 100644
--- a/src/controls/Styles/Desktop/CheckBoxStyle.qml
+++ b/src/controls/Styles/Desktop/CheckBoxStyle.qml
@@ -74,7 +74,7 @@ Style {
renderType: Text.NativeRendering
elide: Text.ElideRight
enabled: control.enabled
- color: __syspal.windowText
+ color: SystemPaletteSingleton.windowText(control.enabled)
StyleItem {
elementType: "focusrect"
anchors.margins: -1
diff --git a/src/controls/Styles/Desktop/MenuStyle.qml b/src/controls/Styles/Desktop/MenuStyle.qml
index 4a0d5894..ecd898cf 100644
--- a/src/controls/Styles/Desktop/MenuStyle.qml
+++ b/src/controls/Styles/Desktop/MenuStyle.qml
@@ -61,7 +61,7 @@ Style {
fill: parent
margins: pixelMetric("menupanelwidth")
}
- color: __syspal.window
+ color: SystemPaletteSingleton.window(control.enabled)
}
Accessible.role: Accessible.PopupMenu
diff --git a/src/controls/Styles/Desktop/RadioButtonStyle.qml b/src/controls/Styles/Desktop/RadioButtonStyle.qml
index 2babc77c..a1809ad2 100644
--- a/src/controls/Styles/Desktop/RadioButtonStyle.qml
+++ b/src/controls/Styles/Desktop/RadioButtonStyle.qml
@@ -77,7 +77,7 @@ Style {
renderType: Text.NativeRendering
elide: Text.ElideRight
enabled: control.enabled
- color: __syspal.windowText
+ color: SystemPaletteSingleton.windowText(control.enabled)
StyleItem {
elementType: "focusrect"
anchors.margins: -1
diff --git a/src/controls/Styles/Desktop/SpinBoxStyle.qml b/src/controls/Styles/Desktop/SpinBoxStyle.qml
index da3beeff..d7d32916 100644
--- a/src/controls/Styles/Desktop/SpinBoxStyle.qml
+++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml
@@ -44,11 +44,6 @@ import QtQuick.Controls.Private 1.0
Style {
readonly property SpinBox control: __control
- property var __syspal: SystemPalette {
- colorGroup: control.enabled ?
- SystemPalette.Active : SystemPalette.Disabled
- }
-
padding {
top: control.__panel ? control.__panel.topPadding + (styleitem.style === "mac" ? 2 : 0) : 0
left: control.__panel ? control.__panel.leftPadding : 0
@@ -70,10 +65,10 @@ Style {
property alias font: styleitem.font
- property color foregroundColor: __syspal.text
- property color backgroundColor: __syspal.base
- property color selectionColor: __syspal.highlight
- property color selectedTextColor: __syspal.highlightedText
+ property color foregroundColor: SystemPaletteSingleton.text(control.enabled)
+ property color backgroundColor: SystemPaletteSingleton.base(control.enabled)
+ property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
+ property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property int topPadding: edit.anchors.topMargin
property int leftPadding: 3 + edit.anchors.leftMargin
diff --git a/src/controls/Styles/Desktop/TableViewStyle.qml b/src/controls/Styles/Desktop/TableViewStyle.qml
index 5ad1f394..605c62d6 100644
--- a/src/controls/Styles/Desktop/TableViewStyle.qml
+++ b/src/controls/Styles/Desktop/TableViewStyle.qml
@@ -45,14 +45,10 @@ import "."
ScrollViewStyle {
id: root
- property var __syspal: SystemPalette {
- colorGroup: control.enabled ?
- SystemPalette.Active : SystemPalette.Disabled
- }
readonly property TableView control: __control
property bool activateItemOnSingleClick: __styleitem.styleHint("activateItemOnSingleClick")
property color textColor: __styleitem.textColor
- property color backgroundColor: __syspal.base
+ property color backgroundColor: SystemPaletteSingleton.base(control.enabled)
property color highlightedTextColor: __styleitem.highlightedTextColor
property StyleItem __styleitem: StyleItem{
diff --git a/src/controls/Styles/Desktop/TextAreaStyle.qml b/src/controls/Styles/Desktop/TextAreaStyle.qml
index 46750c1a..9a177303 100644
--- a/src/controls/Styles/Desktop/TextAreaStyle.qml
+++ b/src/controls/Styles/Desktop/TextAreaStyle.qml
@@ -43,10 +43,10 @@ import QtQuick.Controls.Private 1.0
ScrollViewStyle {
property font font: __styleitem.font
- property color textColor: __syspal.text
- property color selectionColor: __syspal.highlight
- property color selectedTextColor: __syspal.highlightedText
- property color backgroundColor: control.backgroundVisible ? __syspal.base : "transparent"
+ property color textColor: SystemPaletteSingleton.text(control.enabled)
+ property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
+ property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
+ property color backgroundColor: control.backgroundVisible ? SystemPaletteSingleton.base(control.enabled) : "transparent"
property StyleItem __styleitem: StyleItem{
elementType: "edit"
diff --git a/src/controls/Styles/Desktop/TextFieldStyle.qml b/src/controls/Styles/Desktop/TextFieldStyle.qml
index c7e85ff4..585df03d 100644
--- a/src/controls/Styles/Desktop/TextFieldStyle.qml
+++ b/src/controls/Styles/Desktop/TextFieldStyle.qml
@@ -54,17 +54,10 @@ Style {
hover: hovered
hints: control.styleHints
- SystemPalette {
- id: syspal
- colorGroup: control.enabled ?
- SystemPalette.Active :
- SystemPalette.Disabled
- }
-
- property color textColor: syspal.text
+ property color textColor: SystemPaletteSingleton.text(control.enabled)
property color placeholderTextColor: "darkGray"
- property color selectionColor: syspal.highlight
- property color selectedTextColor: syspal.highlightedText
+ property color selectionColor: SystemPaletteSingleton.highlight(control.enabled)
+ property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property bool rounded: !!hints["rounded"]