diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-06-25 10:27:39 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-06-25 10:27:39 +0200 |
commit | 91caf7531476d16c1c7a6d22705cb36ac93c5ab7 (patch) | |
tree | e4f67bcd61c55ba2b8cb4a4d01b10f69837c74e8 /src/controls/Styles/Base | |
parent | 1f0def9e8feca180680c1344cef6cf250b7630ba (diff) | |
parent | 6b876b21cd23f2af879543edf773dac41b4d0e97 (diff) | |
download | qtquickcontrols-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/Base')
-rw-r--r-- | src/controls/Styles/Base/ButtonStyle.qml | 8 | ||||
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Base/CheckBoxStyle.qml | 7 | ||||
-rw-r--r-- | src/controls/Styles/Base/ComboBoxStyle.qml | 8 | ||||
-rw-r--r-- | src/controls/Styles/Base/GroupBoxStyle.qml | 7 | ||||
-rw-r--r-- | src/controls/Styles/Base/MenuBarStyle.qml | 4 | ||||
-rw-r--r-- | src/controls/Styles/Base/ProgressBarStyle.qml | 5 | ||||
-rw-r--r-- | src/controls/Styles/Base/RadioButtonStyle.qml | 7 | ||||
-rw-r--r-- | src/controls/Styles/Base/ScrollViewStyle.qml | 5 | ||||
-rw-r--r-- | src/controls/Styles/Base/SliderStyle.qml | 5 | ||||
-rw-r--r-- | src/controls/Styles/Base/SpinBoxStyle.qml | 12 | ||||
-rw-r--r-- | src/controls/Styles/Base/SwitchStyle.qml | 11 | ||||
-rw-r--r-- | src/controls/Styles/Base/TabViewStyle.qml | 6 | ||||
-rw-r--r-- | src/controls/Styles/Base/TableViewStyle.qml | 4 | ||||
-rw-r--r-- | src/controls/Styles/Base/TextAreaStyle.qml | 8 | ||||
-rw-r--r-- | src/controls/Styles/Base/TextFieldStyle.qml | 11 |
16 files changed, 28 insertions, 82 deletions
diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml index d0299a55..566f93e5 100644 --- a/src/controls/Styles/Base/ButtonStyle.qml +++ b/src/controls/Styles/Base/ButtonStyle.qml @@ -79,12 +79,6 @@ Style { /*! The \l {QtQuick.Controls::}{Button} attached to this style. */ readonly property Button control: __control - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } - /*! The padding between the background and the label components. */ padding { top: 4 @@ -150,7 +144,7 @@ Style { renderType: Text.NativeRendering anchors.verticalCenter: parent.verticalCenter text: control.text - color: __syspal.buttonText + color: SystemPaletteSingleton.buttonText(control.enabled) } } } diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index b5485d82..26ca2048 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -272,7 +272,7 @@ Style { readonly property bool addExtraMargin: control.frameVisible && styleData.selected readonly property color sameMonthDateTextColor: "#444" - readonly property color selectedDateColor: Qt.platform.os === "osx" ? "#3778d0" : __syspal.highlight + readonly property color selectedDateColor: Qt.platform.os === "osx" ? "#3778d0" : SystemPaletteSingleton.highlight(control.enabled) readonly property color selectedDateTextColor: "white" readonly property color differentMonthDateTextColor: "#bbb" readonly property color invalidDateColor: "#dddddd" diff --git a/src/controls/Styles/Base/CheckBoxStyle.qml b/src/controls/Styles/Base/CheckBoxStyle.qml index 2dcaa9e9..c8592b76 100644 --- a/src/controls/Styles/Base/CheckBoxStyle.qml +++ b/src/controls/Styles/Base/CheckBoxStyle.qml @@ -78,11 +78,6 @@ Style { /*! The \l CheckBox attached to this style. */ readonly property CheckBox control: __control - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! This defines the text label. */ property Component label: Item { @@ -105,7 +100,7 @@ Style { id: text text: control.text anchors.centerIn: parent - color: __syspal.text + color: SystemPaletteSingleton.text(control.enabled) renderType: Text.NativeRendering } } diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml index eed7e7f4..de78dc02 100644 --- a/src/controls/Styles/Base/ComboBoxStyle.qml +++ b/src/controls/Styles/Base/ComboBoxStyle.qml @@ -69,11 +69,7 @@ Style { \sa Text::renderType */ property int renderType: Text.NativeRendering - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } + /*! The \l ComboBox attached to this style. */ readonly property ComboBox control: __control @@ -172,7 +168,7 @@ Style { anchors.verticalCenter: parent.verticalCenter text: control.currentText renderType: cbStyle.renderType - color: __syspal.text + color: SystemPaletteSingleton.text(control.enabled) elide: Text.ElideRight } } diff --git a/src/controls/Styles/Base/GroupBoxStyle.qml b/src/controls/Styles/Base/GroupBoxStyle.qml index af8d41b6..545ca07b 100644 --- a/src/controls/Styles/Base/GroupBoxStyle.qml +++ b/src/controls/Styles/Base/GroupBoxStyle.qml @@ -50,11 +50,6 @@ import QtQuick.Controls.Private 1.0 */ Style { - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l GroupBox attached to this style. */ readonly property GroupBox control: __control @@ -67,7 +62,7 @@ Style { } /*! The title text color. */ - property color textColor: __syspal.text + property color textColor: SystemPaletteSingleton.text(control.enabled) /*! The check box. */ property Component checkbox: Item { diff --git a/src/controls/Styles/Base/MenuBarStyle.qml b/src/controls/Styles/Base/MenuBarStyle.qml index 8ab758f5..cff2b095 100644 --- a/src/controls/Styles/Base/MenuBarStyle.qml +++ b/src/controls/Styles/Base/MenuBarStyle.qml @@ -100,14 +100,12 @@ Style { implicitHeight: text.height + 4 color: styleData.open ? "#49d" : "transparent" - SystemPalette { id: syspal } - Text { id: text text: formatMnemonic(styleData.text, styleData.underlineMnemonic) anchors.centerIn: parent renderType: Text.NativeRendering - color: styleData.open ? "white" : syspal.windowText + color: styleData.open ? "white" : SystemPaletteSingleton.windowText(control.enabled) } } diff --git a/src/controls/Styles/Base/ProgressBarStyle.qml b/src/controls/Styles/Base/ProgressBarStyle.qml index 0a98beef..ec379884 100644 --- a/src/controls/Styles/Base/ProgressBarStyle.qml +++ b/src/controls/Styles/Base/ProgressBarStyle.qml @@ -111,11 +111,6 @@ import QtQuick.Controls.Private 1.0 Style { id: progressBarStyle - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l ProgressBar attached to this style. */ readonly property ProgressBar control: __control diff --git a/src/controls/Styles/Base/RadioButtonStyle.qml b/src/controls/Styles/Base/RadioButtonStyle.qml index 0f242eb0..86b7c816 100644 --- a/src/controls/Styles/Base/RadioButtonStyle.qml +++ b/src/controls/Styles/Base/RadioButtonStyle.qml @@ -75,11 +75,6 @@ import QtQuick.Controls.Private 1.0 Style { id: radiobuttonStyle - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l RadioButton attached to this style. */ readonly property RadioButton control: __control @@ -104,7 +99,7 @@ Style { id: text text: control.text anchors.centerIn: parent - color: __syspal.text + color: SystemPaletteSingleton.text(control.enabled) renderType: Text.NativeRendering } } diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml index a962d807..20fc5a19 100644 --- a/src/controls/Styles/Base/ScrollViewStyle.qml +++ b/src/controls/Styles/Base/ScrollViewStyle.qml @@ -51,11 +51,6 @@ import QtQuick.Controls.Private 1.0 Style { id: root - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l ScrollView attached to this style. */ readonly property ScrollView control: __control diff --git a/src/controls/Styles/Base/SliderStyle.qml b/src/controls/Styles/Base/SliderStyle.qml index d5109089..1e2750fb 100644 --- a/src/controls/Styles/Base/SliderStyle.qml +++ b/src/controls/Styles/Base/SliderStyle.qml @@ -82,11 +82,6 @@ import QtQuick.Controls.Private 1.0 Style { id: styleitem - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l Slider attached to this style. */ readonly property Slider control: __control diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml index 57b26ec4..6c76386f 100644 --- a/src/controls/Styles/Base/SpinBoxStyle.qml +++ b/src/controls/Styles/Base/SpinBoxStyle.qml @@ -69,12 +69,6 @@ Style { /*! The \l SpinBox attached to this style. */ readonly property SpinBox control: __control - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } - /*! The content margins of the text field. */ padding { top: 1 ; left: Math.round(styleData.contentHeight/2) ; right: Math.max(22, Math.round(styleData.contentHeight)) ; bottom: 0 } /*! \qmlproperty enumeration horizontalAlignment @@ -93,13 +87,13 @@ Style { property int horizontalAlignment: Qt.AlignRight /*! The text color. */ - property color textColor: __syspal.text + property color textColor: SystemPaletteSingleton.text(control.enabled) /*! The text highlight color, used behind selections. */ - property color selectionColor: __syspal.highlight + property color selectionColor: SystemPaletteSingleton.highlight(control.enabled) /*! The highlighted text color, used in selections. */ - property color selectedTextColor: __syspal.highlightedText + property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled) /*! \qmlproperty enumeration renderType diff --git a/src/controls/Styles/Base/SwitchStyle.qml b/src/controls/Styles/Base/SwitchStyle.qml index 01779582..d5c5cf07 100644 --- a/src/controls/Styles/Base/SwitchStyle.qml +++ b/src/controls/Styles/Base/SwitchStyle.qml @@ -80,8 +80,10 @@ Style { implicitWidth: Math.round((parent.parent.width - padding.left - padding.right)/2) implicitHeight: control.height - padding.top - padding.bottom - border.color: control.activeFocus ? Qt.darker(__syspal.highlight, 2) : Qt.darker(__syspal.button, 2) - property color bg: control.activeFocus ? Qt.darker(__syspal.highlight, 1.2) : __syspal.button + border.color: control.activeFocus ? Qt.darker(highlight, 2) : Qt.darker(button, 2) + property color bg: control.activeFocus ? Qt.darker(highlight, 1.2) : button + property color highlight: SystemPaletteSingleton.highlight(control.enabled) + property color button: SystemPaletteSingleton.button(control.enabled) gradient: Gradient { GradientStop {color: Qt.lighter(bg, 1.4) ; position: 0} GradientStop {color: bg ; position: 1} @@ -92,8 +94,9 @@ Style { /*! This property holds the background groove of the switch. */ property Component groove: Rectangle { - property color shadow: control.checked ? Qt.darker(__syspal.highlight, 1.2): "#999" - property color bg: control.checked ? __syspal.highlight:"#bbb" + property color shadow: control.checked ? Qt.darker(highlight, 1.2): "#999" + property color bg: control.checked ? highlight:"#bbb" + property color highlight: SystemPaletteSingleton.highlight(control.enabled) implicitWidth: Math.round(implicitHeight * 3) implicitHeight: Math.max(16, Math.round(TextSingleton.implicitHeight)) diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml index f13787ad..44c6ca72 100644 --- a/src/controls/Styles/Base/TabViewStyle.qml +++ b/src/controls/Styles/Base/TabViewStyle.qml @@ -169,11 +169,7 @@ Style { elide: Text.ElideMiddle renderType: Text.NativeRendering scale: control.tabPosition === Qt.TopEdge ? 1 : -1 - property var __syspal: SystemPalette { - colorGroup: styleData.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } - color: __syspal.text + color: SystemPaletteSingleton.text(styleData.enabled) Rectangle { anchors.centerIn: parent width: textitem.paintedWidth + 6 diff --git a/src/controls/Styles/Base/TableViewStyle.qml b/src/controls/Styles/Base/TableViewStyle.qml index 5dca6631..b59a38ca 100644 --- a/src/controls/Styles/Base/TableViewStyle.qml +++ b/src/controls/Styles/Base/TableViewStyle.qml @@ -58,10 +58,10 @@ ScrollViewStyle { readonly property TableView control: __control /*! The text color. */ - property color textColor: __syspal.text + property color textColor: SystemPaletteSingleton.text(control.enabled) /*! The background color. */ - property color backgroundColor: control.backgroundVisible ? __syspal.base : "transparent" + property color backgroundColor: control.backgroundVisible ? SystemPaletteSingleton.base(control.enabled) : "transparent" /*! The alternate background color. */ property color alternateBackgroundColor: "#f5f5f5" diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml index 4ffefe63..301ac165 100644 --- a/src/controls/Styles/Base/TextAreaStyle.qml +++ b/src/controls/Styles/Base/TextAreaStyle.qml @@ -71,16 +71,16 @@ ScrollViewStyle { property font font /*! The text color. */ - property color textColor: __syspal.text + property color textColor: SystemPaletteSingleton.text(control.enabled) /*! The text highlight color, used behind selections. */ - property color selectionColor: __syspal.highlight + property color selectionColor: SystemPaletteSingleton.highlight(control.enabled) /*! The highlighted text color, used in selections. */ - property color selectedTextColor: __syspal.highlightedText + property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled) /*! The background color. */ - property color backgroundColor: control.backgroundVisible ? __syspal.base : "transparent" + property color backgroundColor: control.backgroundVisible ? SystemPaletteSingleton.base(control.enabled) : "transparent" /*! \qmlproperty enumeration renderType diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml index dc25033a..f33d4876 100644 --- a/src/controls/Styles/Base/TextFieldStyle.qml +++ b/src/controls/Styles/Base/TextFieldStyle.qml @@ -68,11 +68,6 @@ import QtQuick.Controls.Private 1.0 Style { id: style - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } /*! The \l TextField attached to this style. */ readonly property TextField control: __control @@ -83,13 +78,13 @@ Style { property font font /*! The text color. */ - property color textColor: __syspal.text + property color textColor: SystemPaletteSingleton.text(control.enabled) /*! The text highlight color, used behind selections. */ - property color selectionColor: __syspal.highlight + property color selectionColor: SystemPaletteSingleton.highlight(control.enabled) /*! The highlighted text color, used in selections. */ - property color selectedTextColor: __syspal.highlightedText + property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled) /*! \qmlproperty enumeration renderType |