mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
MainScreen: Bar content is in its own PanelWindow
This commit is contained in:
+4
-8
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user