MainScreen: Bar content is in its own PanelWindow

This commit is contained in:
ItsLemmy
2025-11-09 11:25:06 -05:00
parent d9ca5cdd3a
commit 15539e1445
8 changed files with 221 additions and 34 deletions
+4 -8
View File
@@ -30,9 +30,6 @@ Item {
readonly property real barMarginH: barFloating ? Settings.data.bar.marginHorizontal * Style.marginXL : 0
readonly property real barMarginV: barFloating ? Settings.data.bar.marginVertical * Style.marginXL : 0
// Attachment overlap to fix hairline gap with fractional scaling
readonly property real attachmentOverlap: 1
// Fill the parent (the Loader)
anchors.fill: parent
@@ -68,29 +65,28 @@ Item {
id: bar
// Position and size the bar based on orientation and floating margins
// Extend the bar by attachmentOverlap to eliminate hairline gap
x: {
var baseX = (root.barPosition === "right") ? (parent.width - Style.barHeight - root.barMarginH) : root.barMarginH
if (root.barPosition === "right")
return baseX - root.attachmentOverlap // Extend left towards panels
return baseX // Extend left towards panels
return baseX
}
y: {
var baseY = (root.barPosition === "bottom") ? (parent.height - Style.barHeight - root.barMarginV) : root.barMarginV
if (root.barPosition === "bottom")
return baseY - root.attachmentOverlap // Extend up towards panels
return baseY // Extend up towards panels
return baseY
}
width: {
var baseWidth = root.barIsVertical ? Style.barHeight : (parent.width - root.barMarginH * 2)
if (!root.barIsVertical)
return baseWidth // Horizontal bars extend via height, not width
return baseWidth + root.attachmentOverlap + 1
return baseWidth + 1
}
height: {
var baseHeight = root.barIsVertical ? (parent.height - root.barMarginV * 2) : Style.barHeight
if (!root.barIsVertical)
return baseHeight + root.attachmentOverlap
return baseHeight
return baseHeight // Vertical bars extend via width, not height
}