From 4ca358b5ba96da05c30aafe7696c7a151eedb40d Mon Sep 17 00:00:00 2001 From: Sighthesia Date: Sat, 15 Nov 2025 13:52:15 +0800 Subject: [PATCH] ActiveWindow: fix layout gap left by hidden active window widget --- Modules/Bar/Extras/BarWidgetLoader.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/Bar/Extras/BarWidgetLoader.qml b/Modules/Bar/Extras/BarWidgetLoader.qml index 71f21414..4737f8dc 100644 --- a/Modules/Bar/Extras/BarWidgetLoader.qml +++ b/Modules/Bar/Extras/BarWidgetLoader.qml @@ -21,6 +21,9 @@ Item { implicitWidth: getImplicitSize(loader.item, "implicitWidth") implicitHeight: getImplicitSize(loader.item, "implicitHeight") + // Remove layout space left by hidden widgets + visible: loader.item ? ((loader.item.opacity > 0.0) || (loader.item.hasOwnProperty("hideMode") && loader.item.hideMode === "transparent")) : false + function getImplicitSize(item, prop) { return (item && item.visible) ? Math.round(item[prop]) : 0 }