Bug 490582 - Notification popup can be too narrow to accommodate multiple buttons with long text
Summary: Notification popup can be too narrow to accommodate multiple buttons with lon...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 6.1.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 491071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-20 20:37 UTC by Oleg
Modified: 2024-08-30 21:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments
Dolphin copying notification (21.84 KB, image/png)
2024-07-20 20:37 UTC, Oleg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg 2024-07-20 20:37:37 UTC
Created attachment 171844 [details]
Dolphin copying notification

SUMMARY
When button label text exceeds label width it becomes cropped, which is clearly visible on Russian locale.

STEPS TO REPRODUCE
1. Run Plasma with Russian locale
2. Invoke notification with buttons (for example by copying file in dolphin)

OBSERVED RESULT
The label on "Cancel" button is cropped and the button itself exceeds notification width.

EXPECTED RESULT
They should not? Although I can't come up with good solution in this situation.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.0-3-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Comment 1 Nate Graham 2024-07-26 23:15:11 UTC
Oops. The popup should probably become wider to accommodate longer-than-expected button text.
Comment 2 Nate Graham 2024-07-29 21:52:23 UTC
Ok, so the problem here is that the popup width is hardcoded in Globals.qml. That's not a minimum or maximum size, it's just the size, period.

We should probably make that a minimum size, and allow the buttons to force individual popups to become wider if needed.
Comment 3 Nate Graham 2024-07-31 16:48:00 UTC
*** Bug 491071 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2024-08-12 12:04:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4598
Comment 5 Nate Graham 2024-08-30 21:00:52 UTC
Git commit 347b4bf2fae390f858cdf780d35ea77fbc705ac2 by Nate Graham, on behalf of Arjen Hiemstra.
Committed on 30/08/2024 at 20:02.
Pushed by ngraham into branch 'master'.

applets/notifications: Base popup width on content width

This removes the fixed width constraint of notification popups, instead
basing the width on its content width. It uses the old popup width as
minimum width and allows the popup to expand to a maximum width that is
currently defined as 3 * the minimum width, unless the screen is smaller
in which case it will be limited to screen size. This allows the popup
to better accomodate large or many actions.

min max width

M  +3    -0    applets/notifications/package/contents/ui/NotificationItem.qml
M  +9    -1    applets/notifications/package/contents/ui/NotificationPopup.qml
M  +4    -6    applets/notifications/package/contents/ui/global/Globals.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/347b4bf2fae390f858cdf780d35ea77fbc705ac2