1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22: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

@@ -18,7 +18,7 @@ PanelWindow {
property var modelData
property string screenName: modelData.name
property real backgroundTransparency: Prefs.topBarTransparency
property real backgroundTransparency: SettingsData.topBarTransparency
readonly property int notificationCount: NotificationService.notifications.length
screen: modelData
@@ -29,7 +29,7 @@ PanelWindow {
if (fonts.indexOf("Material Symbols Rounded") === -1)
ToastService.showError("Please install Material Symbols Rounded and Restart your Shell. See README.md for instructions");
Prefs.forceTopBarLayoutRefresh.connect(function() {
SettingsData.forceTopBarLayoutRefresh.connect(function() {
Qt.callLater(() => {
leftSection.visible = false;
centerSection.visible = false;
@@ -45,10 +45,10 @@ PanelWindow {
Connections {
function onTopBarTransparencyChanged() {
root.backgroundTransparency = Prefs.topBarTransparency;
root.backgroundTransparency = SettingsData.topBarTransparency;
}
target: Prefs
target: SettingsData
}
Connections {
@@ -246,7 +246,7 @@ PanelWindow {
anchors.verticalCenter: parent.verticalCenter
Repeater {
model: Prefs.topBarLeftWidgetsModel
model: SettingsData.topBarLeftWidgetsModel
Loader {
property string widgetId: model.widgetId
@@ -367,7 +367,7 @@ PanelWindow {
Repeater {
id: centerRepeater
model: Prefs.topBarCenterWidgetsModel
model: SettingsData.topBarCenterWidgetsModel
Loader {
property string widgetId: model.widgetId
@@ -401,7 +401,7 @@ PanelWindow {
Qt.callLater(centerSection.updateLayout);
}
target: Prefs.topBarCenterWidgetsModel
target: SettingsData.topBarCenterWidgetsModel
}
}
@@ -415,7 +415,7 @@ PanelWindow {
anchors.verticalCenter: parent.verticalCenter
Repeater {
model: Prefs.topBarRightWidgetsModel
model: SettingsData.topBarRightWidgetsModel
Loader {
property string widgetId: model.widgetId