Merge branch 'quattro' into unified-input-method-setup

This commit is contained in:
David Heinemeier Hansson committed 2026-10-10 15:51:52 +02:00
commit 101bb547bb
245 files changed
+19949 -375

No files matched your search

@@ -421,6 +421,19 @@ function popupExpired(entry, duration, now) {
return (Number(now) - Number((entry || {}).timestamp || 0)) >= lifetime
}
// How far a toast on a screen keeps from a top or right bar: the bar's
// thickness on that screen (a notch floor can make a top bar thicker than its
// configured size on one screen), plus the gap. A bar without per-screen
// sizes counts its configured size; a hidden or missing one, the default size.
function barClearance(bar, screenName, defaultBarSize, gapsOut) {
var size = Number(defaultBarSize)
if (bar && !bar.barHidden) {
size = Number(typeof bar.barSizeFor === "function" ? bar.barSizeFor(screenName) : bar.barSize)
size = isFinite(size) ? Math.max(0, size) : 0
}
return size + Number(gapsOut)
}
function popupPlacement(barPosition, barClearance, gapsOut) {
var position = String(barPosition || "top")
var clearance = Number(barClearance)
@@ -501,6 +514,7 @@ if (typeof module !== "undefined") {
serializePopup: serializePopup,
parsePopupFiles: parsePopupFiles,
popupExpired: popupExpired,
barClearance: barClearance,
popupPlacement: popupPlacement
}
}
+7 -3
View File
@@ -45,11 +45,15 @@ Item {
// pull notification popups away from the expected top-right location.
// Falls back to the bar's default size (26 horizontal / 28 vertical) when
// shell.bar isn't reachable so the popup never lands on top of the bar.
// Each screen clears the bar as thick as it is there: a notch floor can make
// a top bar taller than its configured size on one screen only.
readonly property string barPosition: shell && shell.barConfig ? String(shell.barConfig.position || "top") : "top"
readonly property bool barVertical: barPosition === "left" || barPosition === "right"
readonly property int defaultBarSize: barVertical ? Style.bar.sizeVertical : Style.bar.sizeHorizontal
readonly property int liveBarSize: shell && shell.bar && !shell.bar.barHidden ? Math.max(0, shell.bar.barSize) : defaultBarSize
readonly property int barClearance: liveBarSize + Style.gapsOut
function barClearanceFor(screenName) {
return NotificationLogic.barClearance(shell ? shell.bar : null, screenName, defaultBarSize, Style.gapsOut)
}
// Live Notification objects by originalId, kept OUT of the ListModels: a
// QObject stored in a model role becomes a dangling C++ pointer when the
@@ -1026,7 +1030,7 @@ Item {
color: "transparent"
readonly property var popupPlacement: NotificationLogic.popupPlacement(
service.barPosition, service.barClearance, Style.gapsOut)
service.barPosition, service.barClearanceFor(modelData ? modelData.name : ""), Style.gapsOut)
// Full-screen, fixed-size surface (like the OSD overlay). Adding or
// removing a toast changes only the content inside; the Wayland surface