forked from Shinonome/dots-hyprland
fix tab bar interaction with persistent states
This commit is contained in:
@@ -7,7 +7,6 @@ import Quickshell
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: 0
|
spacing: 0
|
||||||
property bool _initialized: false
|
|
||||||
required property var tabButtonList // Something like [{"icon": "notifications", "name": qsTr("Notifications")}, {"icon": "volume_up", "name": qsTr("Volume mixer")}]
|
required property var tabButtonList // Something like [{"icon": "notifications", "name": qsTr("Notifications")}, {"icon": "volume_up", "name": qsTr("Volume mixer")}]
|
||||||
required property var externalTrackedTab
|
required property var externalTrackedTab
|
||||||
property bool enableIndicatorAnimation: false
|
property bool enableIndicatorAnimation: false
|
||||||
@@ -18,10 +17,6 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
currentIndex: root.externalTrackedTab
|
currentIndex: root.externalTrackedTab
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (!root._initialized) {
|
|
||||||
root._initialized = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
root.onCurrentIndexChanged(currentIndex)
|
root.onCurrentIndexChanged(currentIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user