added new config for notifications card padding
This commit is contained in:
@@ -186,7 +186,7 @@ Rectangle {
|
|||||||
readonly property bool atBottom: pos === "bottomleft" || pos === "bottomright"
|
readonly property bool atBottom: pos === "bottomleft" || pos === "bottomright"
|
||||||
|
|
||||||
anchors { top: true; bottom: true; right: atRight; left: !atRight }
|
anchors { top: true; bottom: true; right: atRight; left: !atRight }
|
||||||
implicitWidth: 350 + root.barMargin + 4
|
implicitWidth: 350 + root.barMargin + toastPad
|
||||||
|
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.namespace: "main-shell-notifications-toasts"
|
WlrLayershell.namespace: "main-shell-notifications-toasts"
|
||||||
@@ -197,10 +197,12 @@ Rectangle {
|
|||||||
|
|
||||||
readonly property bool shareEdge: (root.isTop && !atBottom) || (!root.isTop && atBottom)
|
readonly property bool shareEdge: (root.isTop && !atBottom) || (!root.isTop && atBottom)
|
||||||
readonly property int edgeGap: shareEdge ? root.barMargin + root.barHeight + 10 : root.barMargin + 10
|
readonly property int edgeGap: shareEdge ? root.barMargin + root.barHeight + 10 : root.barMargin + 10
|
||||||
|
// Extra clearance so cards don't overlap the frame border stroke
|
||||||
|
readonly property int toastPad: root.barMargin + Cfg.Config.frameBorderWidth + Cfg.Config.notifToastEdgePad
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: toastCol
|
id: toastCol
|
||||||
x: !toastLayer.atRight ? 4 : 4
|
x: toastLayer.atRight ? root.barMargin : toastLayer.toastPad
|
||||||
y: !toastLayer.atBottom ? toastLayer.edgeGap : parent.height - toastLayer.edgeGap - toastCol.height
|
y: !toastLayer.atBottom ? toastLayer.edgeGap : parent.height - toastLayer.edgeGap - toastCol.height
|
||||||
spacing: 8
|
spacing: 8
|
||||||
width: 350
|
width: 350
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ QtObject {
|
|||||||
property int notifTimeoutCritical: 0
|
property int notifTimeoutCritical: 0
|
||||||
|
|
||||||
property int notifIconSize: 18
|
property int notifIconSize: 18
|
||||||
|
property int notifToastEdgePad: 10 // extra gap between toast cards and the frame border
|
||||||
|
|
||||||
// ────────────────────────────────────────────────────────────────────────
|
// ────────────────────────────────────────────────────────────────────────
|
||||||
// LAUNCHER
|
// LAUNCHER
|
||||||
|
|||||||
Reference in New Issue
Block a user