Vertical bar: simpler management
This commit is contained in:
parent
b443c9f492
commit
101e3125a9
11 changed files with 25 additions and 139 deletions
|
|
@ -1,36 +0,0 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
// Bar position property
|
||||
property string position: Settings.data.bar.position
|
||||
|
||||
// Signal emitted when bar position changes
|
||||
signal barPositionChanged(string newPosition)
|
||||
|
||||
// Watch for changes in Settings.data.bar.position
|
||||
Connections {
|
||||
target: Settings
|
||||
function onDataChanged() {
|
||||
if (Settings.data.bar.position !== root.position) {
|
||||
root.position = Settings.data.bar.position
|
||||
root.barPositionChanged(root.position)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Also watch for direct changes to the position property
|
||||
onPositionChanged: {
|
||||
root.barPositionChanged(position)
|
||||
}
|
||||
|
||||
// Function to change bar position
|
||||
function setPosition(newPosition) {
|
||||
Settings.data.bar.position = newPosition
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue