waffles: osd: fix very precisely timed value change causing it to not reopen

This commit is contained in:
end-4
2025-11-23 11:56:18 +01:00
parent fae2309f62
commit a72d5f98af
2 changed files with 9 additions and 3 deletions
@@ -17,7 +17,7 @@ Singleton {
property string iconsPath: `${Directories.assetsPath}/icons/fluent` property string iconsPath: `${Directories.assetsPath}/icons/fluent`
property bool dark: Appearance.m3colors.darkmode property bool dark: Appearance.m3colors.darkmode
property real backgroundTransparency: 0.18 property real backgroundTransparency: 0.13
property real panelBackgroundTransparency: 0.12 property real panelBackgroundTransparency: 0.12
property real panelLayerTransparency: root.dark ? 0.9 : 0.7 property real panelLayerTransparency: root.dark ? 0.9 : 0.7
property real contentTransparency: root.dark ? 0.9 : 0.5 property real contentTransparency: root.dark ? 0.9 : 0.5
@@ -76,6 +76,12 @@ Scope {
Loader { Loader {
id: panelLoader id: panelLoader
active: false active: false
onActiveChanged: {
if (active) return;
root.indicators.forEach(i => {
GlobalStates[i.globalStateValue] = false;
});
}
sourceComponent: PanelWindow { sourceComponent: PanelWindow {
id: panelWindow id: panelWindow
@@ -123,7 +129,7 @@ Scope {
// Animate close of current indicator // Animate close of current indicator
ScriptAction { ScriptAction {
script: { script: {
osdIndicatorLoader.item.close() osdIndicatorLoader.item.close();
} }
} }
// Wait for close anim // Wait for close anim