Skip to content

Commit eabf779

Browse files
committed
fix(notification): use implicitHeight for banner height, remove wrong dockSize fallback
1. Bubble.qml: add 'height: implicitHeight' so the banner height properly updates when content changes (e.g. when a replacement notification has body/actions while the original had none). 2. main.qml: remove dockSize fallback for frontendWindowRect. dockSize (52) != actual dock height (65 from FrontendWindowRect), giving a wrong margin. Return 0 when rect is not ready; the Connections block will refresh once it becomes available.
1 parent 3b69176 commit eabf779

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

panels/notification/bubble/package/Bubble.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ NotifyItemContent {
1414
property var bubble
1515

1616
width: 360
17+
height: implicitHeight
1718
appName: bubble.appName
1819
iconName: bubble.iconName
1920
date: bubble.timeTip

panels/notification/bubble/package/main.qml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ Window {
3131
if (dockPosition !== position)
3232
return 0
3333

34-
let dockSize = dockApplet.dockSize
35-
36-
// When frontendWindowRect is not yet computed (0,0,0,0), fall back to
37-
// dockSize. The Connections block will refresh margins once the rect
38-
// becomes available, giving the precise value.
3934
let frontendRect = dockApplet.frontendWindowRect
35+
// frontendWindowRect is not yet computed, return 0 and wait for
36+
// the Connections block to refresh once it becomes available.
4037
if (frontendRect.width === 0 && frontendRect.height === 0)
41-
return dockSize
38+
return 0
4239

40+
let dockSize = dockApplet.dockSize
4341
let dpr = root.screen.devicePixelRatio
4442
let dockGeometry = Qt.rect(
4543
frontendRect.x / dpr,

0 commit comments

Comments
 (0)