diff --git a/shell/Commons/Style.qml b/shell/Commons/Style.qml index 2c70eaa4..e0d506a1 100644 --- a/shell/Commons/Style.qml +++ b/shell/Commons/Style.qml @@ -8,10 +8,13 @@ import Quickshell.Io // rounding, gap to screen edges, state affordances, spacing, typography // scale, and bar dimensions. // -// `cornerRadius` mirrors Hyprland's `decoration:rounding`, and `gapsOut` -// mirrors `general:gaps_out`. Themes and user Hyprland config own those -// values; the shell picks them up by re-running `hyprctl getoption` on -// startup and after theme IPC applies a theme. +// `cornerRadius` mirrors Hyprland's `decoration:rounding`. `gapsOut` is +// half of Hyprland's `general:gaps_out` — Hyprland's value works well as +// a window-to-window gap but feels too cavernous when used as the +// distance from a panel/notification to the screen edge, so the shell +// halves it. Themes and user Hyprland config own those values; the +// shell picks them up by re-running `hyprctl getoption` on startup and +// after theme IPC applies a theme. // // Typography, spacing, and bar size come from theme/shell.toml. // `[font] base-size` is the rem root; every `Style.font.` derives @@ -24,7 +27,7 @@ QtObject { id: root property int cornerRadius: 0 - property int gapsOut: 10 + property int gapsOut: 5 // ---------------------------------------------------------- state tokens // @@ -349,7 +352,7 @@ QtObject { var css = String(json.css || "") var parts = css.match(/-?\d+(?:\.\d+)?/g) || [] var n = parts.length > 0 ? Number(parts[0]) : Number(json.int) - if (isFinite(n) && n >= 0) gapsOut = Math.round(n) + if (isFinite(n) && n >= 0) gapsOut = Math.max(0, Math.round(n / 2)) } catch (e) { // hyprctl missing / Hyprland not running — leave the previous value. } diff --git a/shell/plugins/notifications/Service.qml b/shell/plugins/notifications/Service.qml index 091428f9..e7c22687 100644 --- a/shell/plugins/notifications/Service.qml +++ b/shell/plugins/notifications/Service.qml @@ -802,10 +802,10 @@ Item { right: service.barPosition !== "left" } margins { - top: service.barPosition === "top" ? service.liveBarSize + Math.round(Style.gapsOut / 2) : Math.round(Style.gapsOut / 2) - bottom: service.barPosition === "bottom" ? service.barClearance : Style.gapsOut - left: service.barPosition === "left" ? service.barClearance : Style.gapsOut - right: service.barPosition === "right" ? service.barClearance : Math.round(Style.gapsOut / 2) + top: service.barPosition === "top" ? service.barClearance : Style.gapsOut + bottom: service.barPosition === "bottom" ? service.barClearance : Style.gapsOut + left: service.barPosition === "left" ? service.barClearance : Style.gapsOut + right: service.barPosition === "right" ? service.barClearance : Style.gapsOut } implicitWidth: popupColumn.implicitWidth