qml: force system theme for label colors

ref #11
This commit is contained in:
Vaxry 2024-10-17 18:06:49 +01:00
parent 0fa58f189b
commit 8b271e2ba3

View file

@ -36,6 +36,11 @@ ApplicationWindow {
Layout.rightMargin: fontMetrics.height * 8 Layout.rightMargin: fontMetrics.height * 8
} }
SystemPalette {
id: system
colorGroup: SystemPalette.Active
}
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
spacing: fontMetrics.height spacing: fontMetrics.height
@ -77,16 +82,19 @@ ApplicationWindow {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Label { Label {
color: system.windowText
text: SystemInfo.systemName text: SystemInfo.systemName
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
Label { Label {
color: system.windowText
text: SystemInfo.systemUrl text: SystemInfo.systemUrl
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
Label { Label {
color: system.windowText
text: SystemInfo.systemKernel text: SystemInfo.systemKernel
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
@ -119,16 +127,19 @@ ApplicationWindow {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
Label { Label {
color: system.windowText
text: "Hyprland" text: "Hyprland"
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
Label { Label {
color: system.windowText
text: SystemInfo.hyprlandVersion text: SystemInfo.hyprlandVersion
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
Label { Label {
color: system.windowText
visible: SystemInfo.hyprlandVersion != text visible: SystemInfo.hyprlandVersion != text
text: SystemInfo.hyprlandVersionLong text: SystemInfo.hyprlandVersionLong
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
@ -147,6 +158,7 @@ ApplicationWindow {
Layout.rightMargin: fontMetrics.height * 4 Layout.rightMargin: fontMetrics.height * 4
component DetailsLabel: Label { component DetailsLabel: Label {
color: system.windowText
Layout.fillWidth: true Layout.fillWidth: true
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap wrapMode: Text.NoWrap