Merge pull request #6366 from scottjones/fix-notification-surface-resize
Fix notification popups stretching/squishing when the count changes
This commit is contained in:
@@ -787,26 +787,22 @@ Item {
|
|||||||
readonly property var popupPlacement: NotificationLogic.popupPlacement(
|
readonly property var popupPlacement: NotificationLogic.popupPlacement(
|
||||||
service.barPosition, service.barClearance, Style.gapsOut)
|
service.barPosition, service.barClearance, Style.gapsOut)
|
||||||
|
|
||||||
anchors {
|
// Full-screen, fixed-size surface (like the OSD overlay). Adding or
|
||||||
top: popupWindow.popupPlacement.anchors.top
|
// removing a toast changes only the content inside; the Wayland surface
|
||||||
bottom: popupWindow.popupPlacement.anchors.bottom
|
// never resizes, so the compositor can't briefly scale a stale buffer --
|
||||||
left: popupWindow.popupPlacement.anchors.left
|
// which is what stretched/squished the cards during count changes.
|
||||||
right: popupWindow.popupPlacement.anchors.right
|
anchors { top: true; bottom: true; left: true; right: true }
|
||||||
}
|
|
||||||
margins {
|
|
||||||
top: popupWindow.popupPlacement.margins.top
|
|
||||||
bottom: popupWindow.popupPlacement.margins.bottom
|
|
||||||
left: popupWindow.popupPlacement.margins.left
|
|
||||||
right: popupWindow.popupPlacement.margins.right
|
|
||||||
}
|
|
||||||
|
|
||||||
implicitWidth: popupColumn.implicitWidth
|
// Keep the surface click-through except over the toast column, so the
|
||||||
implicitHeight: popupColumn.implicitHeight
|
// rest of the (invisible) full-screen overlay never eats input.
|
||||||
|
mask: Region { item: popupColumn }
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: popupColumn
|
id: popupColumn
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: popupWindow.popupPlacement.margins.top
|
||||||
|
anchors.rightMargin: popupWindow.popupPlacement.margins.right
|
||||||
spacing: Style.space(8)
|
spacing: Style.space(8)
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|||||||
Reference in New Issue
Block a user