fix(settings): cleaning remnants of Settings.data.bar.floating

This commit is contained in:
Lemmy
2026-03-20 19:47:14 -04:00
parent 56f3dbec82
commit 9966d695cc
17 changed files with 23 additions and 26 deletions
-1
View File
@@ -15,7 +15,6 @@
"enableExclusionZoneInset": true,
"backgroundOpacity": 0.93,
"useSeparateOpacity": false,
"floating": false,
"marginVertical": 4,
"marginHorizontal": 4,
"frameThickness": 8,
-1
View File
@@ -192,7 +192,6 @@ Singleton {
property bool useSeparateOpacity: false
// Floating bar settings
property bool floating: false
property int marginVertical: 4
property int marginHorizontal: 4
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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));
+1 -1
View File
@@ -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: {
+11 -10
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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
@@ -90,7 +90,6 @@ ColumnLayout {
defaultValue: Settings.getDefaultValue("bar.barType")
onSelected: key => {
Settings.data.bar.barType = key;
Settings.data.bar.floating = (key === "floating");
}
}
@@ -471,7 +471,6 @@ ColumnLayout {
cursorShape: Qt.PointingHandCursor
onClicked: {
Settings.data.bar.barType = modelData.key;
Settings.data.bar.floating = (modelData.key === "floating");
}
}
+1 -1
View File
@@ -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