forked from Shinonome/dots-hyprland
remove persistent state for bottom sidebar group tabs (buggy)
This commit is contained in:
@@ -11,7 +11,6 @@ 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 selectedTab: 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,17 +14,13 @@ 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: PersistentStates.sidebar.bottomGroup.selectedTab
|
property int selectedTab: 0
|
||||||
property bool collapsed: PersistentStates.sidebar.bottomGroup.collapsed
|
property bool collapsed: PersistentStates.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},
|
||||||
{"type": "todo", "name": "To Do", "icon": "done_outline", "widget": todoWidget}
|
{"type": "todo", "name": "To Do", "icon": "done_outline", "widget": todoWidget}
|
||||||
]
|
]
|
||||||
|
|
||||||
onSelectedTabChanged: {
|
|
||||||
PersistentStateManager.setState("sidebar.bottomGroup.selectedTab", selectedTab)
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Appearance.animation.elementMove.duration
|
duration: Appearance.animation.elementMove.duration
|
||||||
|
|||||||
Reference in New Issue
Block a user