1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 15:02:50 -05:00

Settings globally, refactor some menus

This commit is contained in:
bbedward
2025-07-12 14:33:50 -04:00
parent f61ee93484
commit db05496dca
17 changed files with 1100 additions and 70 deletions

View File

@@ -9,7 +9,6 @@ Rectangle {
property var theme: Theme
property var weather
property bool useFahrenheit: false
width: parent.width
height: parent.height
@@ -80,7 +79,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
Text {
text: weather ? ((useFahrenheit ? weather.tempF : weather.temp) + "°" + (useFahrenheit ? "F" : "C")) : ""
text: weather ? ((Prefs.useFahrenheit ? weather.tempF : weather.temp) + "°" + (Prefs.useFahrenheit ? "F" : "C")) : ""
font.pixelSize: theme.fontSizeXLarge
color: theme.surfaceText
font.weight: Font.Light
@@ -89,7 +88,7 @@ Rectangle {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: if (weather) useFahrenheit = !useFahrenheit
onClicked: if (weather) Prefs.setTemperatureUnit(!Prefs.useFahrenheit)
enabled: weather !== null
}
}