feat(layout): implement framed bar visuals and layout logic

This commit is contained in:
tibssy
2026-01-25 00:33:46 +00:00
parent 2516652c21
commit 680dfccfff
6 changed files with 335 additions and 148 deletions
+7 -5
View File
@@ -32,6 +32,8 @@ PanelWindow {
// Position and size to match bar location (per-screen)
readonly property string barPosition: Settings.getBarPositionForScreen(barWindow.screen?.name)
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 real barMarginH: Math.ceil(barFloating ? Settings.data.bar.marginHorizontal : 0)
readonly property real barMarginV: Math.ceil(barFloating ? Settings.data.bar.marginVertical : 0)
@@ -45,12 +47,12 @@ PanelWindow {
right: barPosition === "right" || !barIsVertical
}
// Handle floating margins
// Handle floating margins and framed mode offsets
margins {
top: barPosition === "top" || barIsVertical ? barMarginV : 0
bottom: barPosition === "bottom" || barIsVertical ? barMarginV : 0
left: barPosition === "left" || !barIsVertical ? barMarginH : 0
right: barPosition === "right" || !barIsVertical ? barMarginH : 0
top: (barPosition === "top") ? barMarginV : (isFramed ? frameThickness : barMarginV)
bottom: (barPosition === "bottom") ? barMarginV : (isFramed ? frameThickness : barMarginV)
left: (barPosition === "left") ? barMarginH : (isFramed ? frameThickness : barMarginH)
right: (barPosition === "right") ? barMarginH : (isFramed ? frameThickness : barMarginH)
}
// Set a tight window size