diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 5b32961d3..f52527a6f 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -15,7 +15,6 @@ "enableExclusionZoneInset": true, "backgroundOpacity": 0.93, "useSeparateOpacity": false, - "floating": false, "marginVertical": 4, "marginHorizontal": 4, "frameThickness": 8, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 19a93a517..378346954 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -192,7 +192,6 @@ Singleton { property bool useSeparateOpacity: false // Floating bar settings - property bool floating: false property int marginVertical: 4 property int marginHorizontal: 4 diff --git a/Modules/Bar/Bar.qml b/Modules/Bar/Bar.qml index ca1cf2b2b..7aaeff2ec 100644 --- a/Modules/Bar/Bar.qml +++ b/Modules/Bar/Bar.qml @@ -66,7 +66,7 @@ Item { // Bar positioning properties (per-screen) readonly property string barPosition: Settings.getBarPositionForScreen(screen?.name) readonly property bool barIsVertical: barPosition === "left" || barPosition === "right" - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" // Bar density (per-screen) readonly property string barDensity: Settings.getBarDensityForScreen(screen?.name) diff --git a/Modules/Bar/Extras/BarExclusionZone.qml b/Modules/Bar/Extras/BarExclusionZone.qml index f5333b43d..c2e7b1826 100644 --- a/Modules/Bar/Extras/BarExclusionZone.qml +++ b/Modules/Bar/Extras/BarExclusionZone.qml @@ -14,7 +14,7 @@ PanelWindow { readonly property string barPosition: Settings.getBarPositionForScreen(screen?.name) readonly property bool barIsVertical: barPosition === "left" || barPosition === "right" - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: barFloating ? Settings.data.bar.marginHorizontal : 0 readonly property real barMarginV: barFloating ? Settings.data.bar.marginVertical : 0 readonly property real barHeight: Style.getBarHeightForScreen(screen?.name) diff --git a/Modules/Bar/Widgets/Taskbar.qml b/Modules/Bar/Widgets/Taskbar.qml index 559670157..04b2122c2 100644 --- a/Modules/Bar/Widgets/Taskbar.qml +++ b/Modules/Bar/Widgets/Taskbar.qml @@ -54,7 +54,7 @@ Item { readonly property real maxTaskbarWidth: { if (!screen || isVerticalBar || !smartWidth || maxTaskbarWidthPercent <= 0) return 0; - var barFloating = Settings.data.bar.floating || false; + var barFloating = Settings.data.bar.barType === "floating"; var barMarginH = barFloating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0; var availableWidth = screen.width - (barMarginH * 2); return Math.round(availableWidth * (maxTaskbarWidthPercent / 100)); diff --git a/Modules/DesktopWidgets/DesktopWidgets.qml b/Modules/DesktopWidgets/DesktopWidgets.qml index e440a9ba4..46a3c2104 100644 --- a/Modules/DesktopWidgets/DesktopWidgets.qml +++ b/Modules/DesktopWidgets/DesktopWidgets.qml @@ -307,7 +307,7 @@ Variants { visible: DesktopWidgetRegistry.editMode && Settings.data.desktopWidgets.enabled readonly property string barPos: Settings.getBarPositionForScreen(window.screen?.name) - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barHeight: Style.getBarHeightForScreen(window.screen?.name) readonly property int barOffsetTop: { diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 62502b32c..508fa1870 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -100,8 +100,9 @@ Loader { readonly property string barPosition: Settings.getBarPositionForScreen(modelData?.name) readonly property bool barIsVertical: barPosition === "left" || barPosition === "right" readonly property bool barIsFramed: Settings.data.bar.barType === "framed" && hasBar - readonly property real barMarginH: Settings.data.bar.floating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 - readonly property real barMarginV: Settings.data.bar.floating ? Math.ceil(Settings.data.bar.marginVertical) : 0 + readonly property bool barFloating: Settings.data.bar.barType === "floating" + readonly property real barMarginH: barFloating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 + readonly property real barMarginV: barFloating ? Math.ceil(Settings.data.bar.marginVertical) : 0 readonly property int barHeight: Style.getBarHeightForScreen(modelData?.name) readonly property bool staticPanelOpen: { if (!isAttachedMode) @@ -878,10 +879,10 @@ Loader { anchors.right: dockPosition === "right" // Static margins — no animation, window stays put - margins.top: dockPosition === "top" ? (barAtSameEdge && !exclusive ? barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginVertical : 0) + floatingMargin : floatingMargin) : 0 - margins.bottom: dockPosition === "bottom" ? (barAtSameEdge && !exclusive ? barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginVertical : 0) + floatingMargin : floatingMargin) : 0 - margins.left: dockPosition === "left" ? (barAtSameEdge && !exclusive ? barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal : 0) + floatingMargin : floatingMargin) : 0 - margins.right: dockPosition === "right" ? (barAtSameEdge && !exclusive ? barHeight + (Settings.data.bar.floating ? Settings.data.bar.marginHorizontal : 0) + floatingMargin : floatingMargin) : 0 + margins.top: dockPosition === "top" ? (barAtSameEdge && !exclusive ? barHeight + (barFloating ? Settings.data.bar.marginVertical : 0) + floatingMargin : floatingMargin) : 0 + margins.bottom: dockPosition === "bottom" ? (barAtSameEdge && !exclusive ? barHeight + (barFloating ? Settings.data.bar.marginVertical : 0) + floatingMargin : floatingMargin) : 0 + margins.left: dockPosition === "left" ? (barAtSameEdge && !exclusive ? barHeight + (barFloating ? Settings.data.bar.marginHorizontal : 0) + floatingMargin : floatingMargin) : 0 + margins.right: dockPosition === "right" ? (barAtSameEdge && !exclusive ? barHeight + (barFloating ? Settings.data.bar.marginHorizontal : 0) + floatingMargin : floatingMargin) : 0 // Container wrapper for animations Item { @@ -889,10 +890,10 @@ Loader { // Helper properties for orthogonal bar detection readonly property string screenBarPosition: Settings.getBarPositionForScreen(modelData?.name) - readonly property bool barOnLeft: hasBar && screenBarPosition === "left" && !Settings.data.bar.floating - readonly property bool barOnRight: hasBar && screenBarPosition === "right" && !Settings.data.bar.floating - readonly property bool barOnTop: hasBar && screenBarPosition === "top" && !Settings.data.bar.floating - readonly property bool barOnBottom: hasBar && screenBarPosition === "bottom" && !Settings.data.bar.floating + readonly property bool barOnLeft: hasBar && screenBarPosition === "left" && !barFloating + readonly property bool barOnRight: hasBar && screenBarPosition === "right" && !barFloating + readonly property bool barOnTop: hasBar && screenBarPosition === "top" && !barFloating + readonly property bool barOnBottom: hasBar && screenBarPosition === "bottom" && !barFloating // Calculate padding needed to shift center to match exclusive mode readonly property int extraTop: (isVertical && !exclusive && barOnTop) ? barHeight : 0 diff --git a/Modules/MainScreen/BarContentWindow.qml b/Modules/MainScreen/BarContentWindow.qml index 562cb1895..32bcc9584 100644 --- a/Modules/MainScreen/BarContentWindow.qml +++ b/Modules/MainScreen/BarContentWindow.qml @@ -41,7 +41,7 @@ PanelWindow { readonly property bool barIsVertical: barPosition === "left" || barPosition === "right" readonly property bool isFramed: Settings.data.bar.barType === "framed" readonly property real frameThickness: Settings.data.bar.frameThickness ?? 12 - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: Math.ceil(barFloating ? Settings.data.bar.marginHorizontal : 0) readonly property real barMarginV: Math.ceil(barFloating ? Settings.data.bar.marginVertical : 0) readonly property real barHeight: Style.getBarHeightForScreen(barWindow.screen?.name) diff --git a/Modules/MainScreen/BarExclusionZone.qml b/Modules/MainScreen/BarExclusionZone.qml index e9696e62e..cad17da2f 100644 --- a/Modules/MainScreen/BarExclusionZone.qml +++ b/Modules/MainScreen/BarExclusionZone.qml @@ -20,7 +20,7 @@ PanelWindow { readonly property bool autoHide: Settings.getBarDisplayModeForScreen(screen?.name) === "auto_hide" readonly property bool nonExclusive: Settings.getBarDisplayModeForScreen(screen?.name) === "non_exclusive" - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: (barFloating && edge === Settings.getBarPositionForScreen(screen?.name)) ? Math.ceil(Settings.data.bar.marginVertical) : 0 // Allow users to enable a 1-physical-pixel inset for the exclusion zone so window borders can bleed under the bar diff --git a/Modules/MainScreen/MainScreen.qml b/Modules/MainScreen/MainScreen.qml index 712e4f25e..1dcabcd65 100644 --- a/Modules/MainScreen/MainScreen.qml +++ b/Modules/MainScreen/MainScreen.qml @@ -442,7 +442,7 @@ PanelWindow { readonly property bool barIsVertical: barPosition === "left" || barPosition === "right" readonly property bool isFramed: Settings.data.bar.barType === "framed" readonly property real frameThickness: Settings.data.bar.frameThickness ?? 12 - readonly property bool barFloating: Settings.data.bar.floating || false + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: barFloating ? Math.floor(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: barFloating ? Math.floor(Settings.data.bar.marginVertical) : 0 readonly property real barHeight: Style.getBarHeightForScreen(screen?.name) diff --git a/Modules/MainScreen/SmartPanel.qml b/Modules/MainScreen/SmartPanel.qml index c9904a229..0d5621cc3 100644 --- a/Modules/MainScreen/SmartPanel.qml +++ b/Modules/MainScreen/SmartPanel.qml @@ -102,7 +102,7 @@ Item { readonly property bool hasBar: modelData && modelData.name ? (Settings.data.bar.monitors.includes(modelData.name) || (Settings.data.bar.monitors.length === 0)) : false readonly property bool isFramed: Settings.data.bar.barType === "framed" && hasBar readonly property real frameThickness: Settings.data.bar.frameThickness ?? 12 - readonly property bool barFloating: Settings.data.bar.floating + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: (barFloating && barShouldShow) ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: (barFloating && barShouldShow) ? Math.ceil(Settings.data.bar.marginVertical) : 0 readonly property real attachmentOverlap: 1 // Panel extends into bar area to fix hairline gap with fractional scaling diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 644032ce9..8f308ffd0 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -96,7 +96,7 @@ Variants { readonly property bool isCentered: location === "top" || location === "bottom" readonly property string barPos: Settings.getBarPositionForScreen(notifWindow.screen?.name) - readonly property bool isFloating: Settings.data.bar.floating + readonly property bool isFloating: Settings.data.bar.barType === "floating" readonly property real barHeight: Style.getBarHeightForScreen(notifWindow.screen?.name) readonly property bool isFramed: Settings.data.bar.barType === "framed" diff --git a/Modules/OSD/OSD.qml b/Modules/OSD/OSD.qml index fda71e3f2..74010c6f3 100644 --- a/Modules/OSD/OSD.qml +++ b/Modules/OSD/OSD.qml @@ -495,7 +495,7 @@ Variants { let base = Style.marginM; if (screenBarPosition === position) { const isVertical = position === "top" || position === "bottom"; - const floatExtra = Math.ceil(Settings.data.bar.floating ? (isVertical ? Settings.data.bar.marginVertical : Settings.data.bar.marginHorizontal) : 0); + const floatExtra = Math.ceil(Settings.data.bar.barType === "floating" ? (isVertical ? Settings.data.bar.marginVertical : Settings.data.bar.marginHorizontal) : 0); return barHeight + base + floatExtra; } diff --git a/Modules/Panels/Settings/SettingsPanel.qml b/Modules/Panels/Settings/SettingsPanel.qml index 71220b1c4..f4de52e6a 100644 --- a/Modules/Panels/Settings/SettingsPanel.qml +++ b/Modules/Panels/Settings/SettingsPanel.qml @@ -20,7 +20,7 @@ SmartPanel { readonly property string barDensity: Settings.data.bar.density readonly property string barPosition: Settings.getBarPositionForScreen(screen?.name) - readonly property bool barFloating: Settings.data.bar.floating + readonly property bool barFloating: Settings.data.bar.barType === "floating" readonly property real barMarginH: barFloating ? Math.ceil(Settings.data.bar.marginHorizontal) : 0 readonly property real barMarginV: barFloating ? Math.ceil(Settings.data.bar.marginVertical) : 0 diff --git a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml index 1586f6935..61ae9f69d 100644 --- a/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml +++ b/Modules/Panels/Settings/Tabs/Bar/AppearanceSubTab.qml @@ -90,7 +90,6 @@ ColumnLayout { defaultValue: Settings.getDefaultValue("bar.barType") onSelected: key => { Settings.data.bar.barType = key; - Settings.data.bar.floating = (key === "floating"); } } diff --git a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml index 0666eb14f..955f29cd0 100644 --- a/Modules/Panels/SetupWizard/SetupCustomizeStep.qml +++ b/Modules/Panels/SetupWizard/SetupCustomizeStep.qml @@ -471,7 +471,6 @@ ColumnLayout { cursorShape: Qt.PointingHandCursor onClicked: { Settings.data.bar.barType = modelData.key; - Settings.data.bar.floating = (modelData.key === "floating"); } } diff --git a/Modules/Toast/ToastScreen.qml b/Modules/Toast/ToastScreen.qml index 4bb9a7c37..493a1e29b 100644 --- a/Modules/Toast/ToastScreen.qml +++ b/Modules/Toast/ToastScreen.qml @@ -147,7 +147,7 @@ Item { readonly property real frameThickness: Settings.data.bar.frameThickness ?? 8 readonly property string barPos: Settings.getBarPositionForScreen(panel.screen?.name) - readonly property bool isFloating: Settings.data.bar.floating + readonly property bool isFloating: Settings.data.bar.barType === "floating" readonly property real barHeight: Style.getBarHeightForScreen(panel.screen?.name) // Calculate bar and frame offsets for each edge separately