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

config refacotr: separate settings.json, session.json, appusage.json

This commit is contained in:
bbedward
2025-08-06 11:47:24 -04:00
parent defc50eec6
commit 18aa557ef1
45 changed files with 639 additions and 529 deletions

View File

@@ -70,7 +70,7 @@ Item {
Image {
id: wallpaperBackground
anchors.fill: parent
source: Prefs.wallpaperPath || ""
source: SessionData.wallpaperPath || ""
fillMode: Image.PreserveAspectCrop
smooth: true
asynchronous: true
@@ -114,7 +114,7 @@ Item {
id: clockText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
text: Prefs.use24HourClock ? Qt.formatTime(new Date(), "H:mm") : Qt.formatTime(new Date(), "h:mm AP")
text: SettingsData.use24HourClock ? Qt.formatTime(new Date(), "H:mm") : Qt.formatTime(new Date(), "h:mm AP")
font.pixelSize: 120
font.weight: Font.Light
color: "white"
@@ -124,7 +124,7 @@ Item {
interval: 1000
running: true
repeat: true
onTriggered: parent.text = Prefs.use24HourClock ? Qt.formatTime(new Date(), "H:mm") : Qt.formatTime(new Date(), "h:mm AP")
onTriggered: parent.text = SettingsData.use24HourClock ? Qt.formatTime(new Date(), "H:mm") : Qt.formatTime(new Date(), "h:mm AP")
}
}
@@ -517,7 +517,7 @@ Item {
anchors.right: parent.right
anchors.margins: Theme.spacingXL
text: WeatherService.weather.available && WeatherService.weather.city && WeatherService.weather.city !== "Unknown" ?
`${WeatherService.weather.city} ${(Prefs.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp)}°${(Prefs.useFahrenheit ? "F" : "C")}` :
`${WeatherService.weather.city} ${(SettingsData.useFahrenheit ? WeatherService.weather.tempF : WeatherService.weather.temp)}°${(SettingsData.useFahrenheit ? "F" : "C")}` :
""
font.pixelSize: Theme.fontSizeMedium
color: "white"