mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Bar vs Dock: Dock are loaded only once the bar is fully loaded. This ensure the vertical bar use the full screen height if the dock is exclusive.
This commit is contained in:
+21
-4
@@ -9,6 +9,13 @@ Singleton {
|
||||
|
||||
property bool hasAudioVisualizer: false
|
||||
property bool isVisible: true
|
||||
property var readyBars: ({})
|
||||
|
||||
// Registry to store actual widget instances
|
||||
// Key format: "screenName|section|widgetId|index"
|
||||
property var widgetInstances: ({})
|
||||
|
||||
signal barReadyChanged(string screenName)
|
||||
|
||||
// Simple timer that run once when the widget structure has changed
|
||||
// and determine if any MediaMini widget has the visualizer on
|
||||
@@ -28,14 +35,24 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
// Registry to store actual widget instances
|
||||
// Key format: "screenName|section|widgetId|index"
|
||||
property var widgetInstances: ({})
|
||||
|
||||
Component.onCompleted: {
|
||||
Logger.log("BarService", "Service started")
|
||||
}
|
||||
|
||||
// Function for the Bar to call when it's ready
|
||||
function registerBar(screenName) {
|
||||
if (!readyBars[screenName]) {
|
||||
readyBars[screenName] = true
|
||||
console.log("ShellStateService: Bar on screen '" + screenName + "' is ready.")
|
||||
barReadyChanged(screenName)
|
||||
}
|
||||
}
|
||||
|
||||
// Function for the Dock to check if the bar is ready
|
||||
function isBarReady(screenName) {
|
||||
return readyBars[screenName] || false
|
||||
}
|
||||
|
||||
// Register a widget instance
|
||||
function registerWidget(screenName, section, widgetId, index, instance) {
|
||||
const key = [screenName, section, widgetId, index].join("|")
|
||||
|
||||
Reference in New Issue
Block a user