Bug 497795 - Dialog.qml: Custom footer leading and trailing items don't contribute to implicitWidth, which can make them overflow
Summary: Dialog.qml: Custom footer leading and trailing items don't contribute to impl...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.9.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-22 20:23 UTC by vovanblhc
Modified: 2025-01-06 21:11 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vovanblhc 2024-12-22 20:23:49 UTC
SUMMARY
The dialog window that appears when clicking "Quit application" in the system monitor looks strange on Russian locale.
With American English that window looks normal.

STEPS TO REPRODUCE
1. Set the language to Russian in plasma system settings
2. Apply the language changes by restarting the session
3. Open system monitor, right-click an application and press "Quit application"

OBSERVED RESULT
The appeared dialog window is too small to fit the buttons, buttons are partly drawn outside the window

EXPECTED RESULT
The appeared dialog window is large enough to fit the buttons and there are no issues with dialog's layout

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch linux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Comment 1 Chagias Panagiotis 2025-01-03 18:58:13 UTC
I have `American English` set as the `Language` in `System Settings` -> `Region & Language` and I can observe this behavior too.
When I right-click `Quit Application` the `Quit Application` option inside the dialog pop-up doesn't fit in the dialog and extends beyond it.

Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.6.68-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD FX(tm)-8350 Eight-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: OLAND
Comment 2 Nate Graham 2025-01-06 19:34:34 UTC
As a quicker way of testing, I can reproduce the issue with `LANGUAGE=ru_RU plasma-systemmonitor`. I'll try to fix it.
Comment 3 Nate Graham 2025-01-06 20:08:38 UTC
Ahh, this is actually a bug in Kirigami Dialog, similar to Bug 493663. It looks like we forgot to include the width of any custom footer content. Will fix.
Comment 4 Bug Janitor Service 2025-01-06 20:19:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1696
Comment 5 Nate Graham 2025-01-06 21:11:55 UTC
Git commit 4eead05f96f7bc7f963e4dc25ade272bc375b82c by Nate Graham.
Committed on 06/01/2025 at 20:11.
Pushed by ngraham into branch 'master'.

Dialog: include leading and trailing components in footer implicitWidth

4fb4d656dfa5161ac4676d278bcd7cb08327a753 fixed footer sizing by taking
into account the implicitWidth of the DialogButtonBox, which can be
wider that the main body content. However leading and trailing footer
components were missed, so if any of those are included in a particular
Dialog's implementation, its footer may still overflow.

Account for those by getting the implicitWidth of the RowLayout item
that holds all of them, which also fixes the spacing between items not
being included in the calculation.
FIXED-IN: 6.11

M  +2    -1    src/dialogs/Dialog.qml

https://invent.kde.org/frameworks/kirigami/-/commit/4eead05f96f7bc7f963e4dc25ade272bc375b82c