forked from Shinonome/dots-hyprland
moved storage from config to persistent state
This commit is contained in:
@@ -206,9 +206,6 @@ Singleton {
|
|||||||
property string username: "[unset]"
|
property string username: "[unset]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property JsonObject bottomWidgetRight: JsonObject {
|
|
||||||
property int lastTab: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property JsonObject time: JsonObject {
|
property JsonObject time: JsonObject {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ Singleton {
|
|||||||
property JsonObject sidebar: JsonObject {
|
property JsonObject sidebar: JsonObject {
|
||||||
property JsonObject bottomGroup: JsonObject {
|
property JsonObject bottomGroup: JsonObject {
|
||||||
property bool collapsed: false
|
property bool collapsed: false
|
||||||
|
property int tab: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Singleton {
|
|||||||
property QtObject sidebar: QtObject {
|
property QtObject sidebar: QtObject {
|
||||||
property QtObject bottomGroup: QtObject {
|
property QtObject bottomGroup: QtObject {
|
||||||
property bool collapsed: false
|
property bool collapsed: false
|
||||||
|
property int tab: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Rectangle {
|
|||||||
color: Appearance.colors.colLayer1
|
color: Appearance.colors.colLayer1
|
||||||
clip: true
|
clip: true
|
||||||
implicitHeight: collapsed ? collapsedBottomWidgetGroupRow.implicitHeight : bottomWidgetGroupRow.implicitHeight
|
implicitHeight: collapsed ? collapsedBottomWidgetGroupRow.implicitHeight : bottomWidgetGroupRow.implicitHeight
|
||||||
property int selectedTab: Config.options.sidebar.bottomWidgetRight.lastTab
|
property int selectedTab: Persistent.states.sidebar.bottomGroup.tab
|
||||||
property bool collapsed: Persistent.states.sidebar.bottomGroup.collapsed
|
property bool collapsed: Persistent.states.sidebar.bottomGroup.collapsed
|
||||||
property var tabs: [
|
property var tabs: [
|
||||||
{"type": "calendar", "name": "Calendar", "icon": "calendar_month", "widget": calendarWidget},
|
{"type": "calendar", "name": "Calendar", "icon": "calendar_month", "widget": calendarWidget},
|
||||||
@@ -146,7 +146,7 @@ Rectangle {
|
|||||||
buttonIcon: modelData.icon
|
buttonIcon: modelData.icon
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.selectedTab = index
|
root.selectedTab = index
|
||||||
Config.options.sidebar.bottomWidgetRight.lastTab = index
|
Persistent.states.sidebar.bottomGroup.tab = index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user