mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Bar/Panels: Unified transparency for panels and bar!
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
// Migrate bar.backgroundOpacity to ui.panelBackgroundOpacity
|
||||
function migrate(adapter, logger, rawJson) {
|
||||
logger.i("Settings", "Migrating settings to v29");
|
||||
|
||||
// Check rawJson for old property (adapter doesn't expose removed properties)
|
||||
if (rawJson?.bar?.backgroundOpacity !== undefined) {
|
||||
adapter.ui.panelBackgroundOpacity = Math.max(0.4, rawJson.bar.backgroundOpacity);
|
||||
adapter.bar.transparent = (rawJson.bar.backgroundOpacity < 0.1);
|
||||
logger.i("Settings", "Migrated bar.backgroundOpacity to ui.panelBackgroundOpacity: " + adapter.ui.panelBackgroundOpacity);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,12 @@ QtObject {
|
||||
// Map of version number to migration component
|
||||
readonly property var migrations: ({
|
||||
27: migration27Component,
|
||||
28: migration28Component
|
||||
28: migration28Component,
|
||||
29: migration29Component
|
||||
})
|
||||
|
||||
// Migration components
|
||||
property Component migration27Component: Migration27 {}
|
||||
property Component migration28Component: Migration28 {}
|
||||
property Component migration29Component: Migration29 {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user