Use dark/light specification from system
This commit is contained in:
@@ -16,6 +16,8 @@ ApplicationWindow
|
||||
property string confile: ""
|
||||
property alias settingsFileDialog: settingsFiledialog
|
||||
|
||||
palette.text: Colors.foreground
|
||||
|
||||
|
||||
TopBar
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ T.Button {
|
||||
id: control
|
||||
|
||||
|
||||
icon.color: Colors.foreground
|
||||
icon.color: Colors.primaryContrast
|
||||
icon.height: 21
|
||||
icon.width: 21
|
||||
implicitHeight: Math.max(
|
||||
@@ -32,7 +32,7 @@ T.Button {
|
||||
icon: control.icon
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: Colors.foreground
|
||||
color: Colors.primaryContrast
|
||||
}
|
||||
|
||||
onIconChanged: () => {
|
||||
|
||||
@@ -6,10 +6,11 @@ QtObject {
|
||||
readonly property int dark: 0
|
||||
readonly property int light: 1
|
||||
|
||||
property int theme: dark
|
||||
property int theme: Application.styleHints.colorScheme === Qt.ColorScheme.Light ? light : dark
|
||||
|
||||
readonly property color primary: "#b81a34"
|
||||
readonly property color foreground: theme === dark ? "#fdfdfd" : "#110b0c"
|
||||
property color primary: "#b81a34"
|
||||
property color primaryContrast: "#fdfdfd"
|
||||
property color foreground: theme === dark ? "#fdfdfd" : "#110b0c"
|
||||
readonly property color background: theme === dark ? "#303136" : "#eff1f5"
|
||||
readonly property color mantle: theme === dark ? "#1e1f22" : "#e7e9ef"
|
||||
readonly property color interactive: theme === dark ? "#878b97" : "#d9d9da"
|
||||
|
||||
5
TeroStyle/Label.qml
Normal file
5
TeroStyle/Label.qml
Normal file
@@ -0,0 +1,5 @@
|
||||
import QtQuick.Controls
|
||||
|
||||
Label {
|
||||
color: Colors.foreground
|
||||
}
|
||||
@@ -5,4 +5,5 @@ singleton Typography Typography.qml
|
||||
Button Button.qml
|
||||
ComboBox ComboBox.qml
|
||||
Field Field.qml
|
||||
Label Label.qml
|
||||
TextField TextField.qml
|
||||
3
qml.qrc
3
qml.qrc
@@ -52,8 +52,9 @@
|
||||
<file>TeroStyle/Button.qml</file>
|
||||
<file>TeroStyle/Colors.qml</file>
|
||||
<file>TeroStyle/ComboBox.qml</file>
|
||||
<file>TeroStyle/Field.qml</file>
|
||||
<file>TeroStyle/Dimensions.qml</file>
|
||||
<file>TeroStyle/Field.qml</file>
|
||||
<file>TeroStyle/Label.qml</file>
|
||||
<file>TeroStyle/qmldir</file>
|
||||
<file>TeroStyle/TextField.qml</file>
|
||||
<file>TeroStyle/Typography.qml</file>
|
||||
|
||||
Reference in New Issue
Block a user