summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/GroupBox.qml1
-rw-r--r--src/styles/ButtonStyle.qml6
-rw-r--r--src/styles/CheckBoxStyle.qml6
-rw-r--r--src/styles/ComboBoxStyle.qml6
-rw-r--r--src/styles/GroupBoxStyle.qml6
-rw-r--r--src/styles/RadioButtonStyle.qml6
-rw-r--r--src/styles/TabViewStyle.qml7
-rw-r--r--src/styles/TableViewStyle.qml7
-rw-r--r--src/styles/TextFieldStyle.qml2
9 files changed, 44 insertions, 3 deletions
diff --git a/src/controls/GroupBox.qml b/src/controls/GroupBox.qml
index 6aa94e09..4f1c0fd0 100644
--- a/src/controls/GroupBox.qml
+++ b/src/controls/GroupBox.qml
@@ -166,6 +166,7 @@ Item {
onLoaded: item.z = -1
Loader {
id: styleLoader
+ property alias control: groupbox
sourceComponent: groupbox.style
}
}
diff --git a/src/styles/ButtonStyle.qml b/src/styles/ButtonStyle.qml
index 4affdddf..94c1cf8f 100644
--- a/src/styles/ButtonStyle.qml
+++ b/src/styles/ButtonStyle.qml
@@ -51,7 +51,11 @@ Style {
id: buttonstyle
property font font
property color backgroundColor: "lightGray"
- property color foregroundColor: "black"
+ property color foregroundColor: __syspal.text
+
+ property var __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
property Component label: Item {
Text {
diff --git a/src/styles/CheckBoxStyle.qml b/src/styles/CheckBoxStyle.qml
index 3002c284..4c3ebd6a 100644
--- a/src/styles/CheckBoxStyle.qml
+++ b/src/styles/CheckBoxStyle.qml
@@ -49,6 +49,11 @@ import QtQuick.Controls 1.0
Style {
property int labelSpacing: 6
+ property color textColor: __syspal.text
+
+ property SystemPalette __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
property Component indicator: Item {
implicitWidth: 18
@@ -97,6 +102,7 @@ Style {
property Component label: Text {
text: control.text
+ color: textColor
renderType: Text.NativeRendering
}
diff --git a/src/styles/ComboBoxStyle.qml b/src/styles/ComboBoxStyle.qml
index d7fff202..380efbb4 100644
--- a/src/styles/ComboBoxStyle.qml
+++ b/src/styles/ComboBoxStyle.qml
@@ -47,6 +47,11 @@ import QtQuick.Controls.Styles 1.0
*/
Style {
+ property color foregroundColor: __syspal.text
+
+ property var __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
property Component panel: Item {
implicitWidth: 100
@@ -79,6 +84,7 @@ Style {
id: textitem
anchors.centerIn: parent
text: control.currentText
+ color: foregroundColor
renderType: Text.NativeRendering
}
Image {
diff --git a/src/styles/GroupBoxStyle.qml b/src/styles/GroupBoxStyle.qml
index 5a46aed1..8ecdf686 100644
--- a/src/styles/GroupBoxStyle.qml
+++ b/src/styles/GroupBoxStyle.qml
@@ -48,6 +48,11 @@ import QtQuick.Controls.Styles 1.0
*/
Style {
property int margin: 9
+ property color textColor: __syspal.text
+
+ property SystemPalette __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
property Component panel:
Item {
@@ -58,6 +63,7 @@ Style {
anchors.left: parent.left
anchors.margins: 4
text: control.title
+ color: textColor
renderType: Text.NativeRendering
}
BorderImage {
diff --git a/src/styles/RadioButtonStyle.qml b/src/styles/RadioButtonStyle.qml
index 8e7c9a7b..f72b4af3 100644
--- a/src/styles/RadioButtonStyle.qml
+++ b/src/styles/RadioButtonStyle.qml
@@ -49,6 +49,11 @@ import QtQuick.Controls 1.0
Style {
property int labelSpacing: 6
+ property color textColor: __syspal.text
+
+ property SystemPalette __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
property Component indicator: Rectangle {
width: 17
@@ -71,6 +76,7 @@ Style {
}
property Component label: Text {
text: control.text
+ color: textColor
renderType: Text.NativeRendering
}
diff --git a/src/styles/TabViewStyle.qml b/src/styles/TabViewStyle.qml
index fe50d5aa..14c01872 100644
--- a/src/styles/TabViewStyle.qml
+++ b/src/styles/TabViewStyle.qml
@@ -73,6 +73,12 @@ Style {
property int tabvshift : 0
property int tabBaseOverlap: 2
+ property color textColor: __syspal.text
+
+ property var __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
+
property Component frame: Item {
Rectangle {
anchors.fill: parent
@@ -125,6 +131,7 @@ Style {
id: textitem
anchors.centerIn: parent
text: tab.title
+ color: textColor
renderType: Text.NativeRendering
}
}
diff --git a/src/styles/TableViewStyle.qml b/src/styles/TableViewStyle.qml
index 05aa18fa..33ce563f 100644
--- a/src/styles/TableViewStyle.qml
+++ b/src/styles/TableViewStyle.qml
@@ -45,9 +45,13 @@ import QtQuick.Controls.Styles 1.0
ScrollViewStyle {
id: root
- property color textColor: "black"
+ property color textColor: __syspal.text
property color highlightedTextColor: "white"
+ property SystemPalette __syspal: SystemPalette {
+ colorGroup: control.enabled ? SystemPalette.Active : SystemPalette.Disabled
+ }
+
property Component headerDelegate: Rectangle {
gradient: Gradient {
GradientStop {position: 0 ; color: "#eee"}
@@ -62,6 +66,7 @@ ScrollViewStyle {
horizontalAlignment: Text.AlignLeft
anchors.leftMargin: 4
text: itemValue
+ color: textColor
renderType: Text.NativeRendering
}
Rectangle {
diff --git a/src/styles/TextFieldStyle.qml b/src/styles/TextFieldStyle.qml
index de70fe85..6af4f0a9 100644
--- a/src/styles/TextFieldStyle.qml
+++ b/src/styles/TextFieldStyle.qml
@@ -55,7 +55,7 @@ Style {
property int rightMargin: 6
property int bottomMargin: 4
- property color foregroundColor: "black"
+ property color foregroundColor: __syspal.text
property color backgroundColor: "white"
property color selectionColor: __syspal.highlight
property color selectedTextColor: __syspal.highlightedText