Bug 478125 - "Tools" button gets get pushed into the hamburger menu when its label is too long to fit in the fixes space allocated for it
Summary: "Tools" button gets get pushed into the hamburger menu when its label is too ...
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.90.0
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: qt6
: 453801 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-05 20:46 UTC by Жора Змейкин
Modified: 2023-12-21 11:22 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.0
Sentry Crash Report:


Attachments
Screenshot (114.36 KB, image/png)
2023-12-05 20:46 UTC, Жора Змейкин
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Жора Змейкин 2023-12-05 20:46:03 UTC
Created attachment 163923 [details]
Screenshot

If you run the system monitor with the environment parameter LANG=ru_RU.UTF-8, the "Tools" button disappears. My system is in Russian, so I encountered this right away. If you run the system monitor with the environment parameter LANG=en_US.UTF-8, the button returns.

STEPS TO REPRODUCE
1. Generate Russian or other locales.
2. Run the system monitor in a different language, for example: LANG=ru_RU.UTF-8 plasma-systemmonitor

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon (Unstable), Wayland
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.0

ADDITIONAL INFORMATION
I've attached a screenshot
Comment 1 Paolo Zamponi 2023-12-07 06:31:51 UTC
Cannot reproduce: it works for me on Neon (Unstable), Wayland, in Italian
Comment 2 Nate Graham 2023-12-07 20:34:06 UTC
Can reproduce with `LANG=ru_RU.UTF-8 plasma-systemmonitor`.
Comment 3 ratijas 2023-12-08 15:14:54 UTC
Is not gone completely. It just hides inside the "More" / hamburger menu. The whole header is a "ToolBarLayout", so the Tools button is just another item in the layout which is allowed to be collapsed under the "More" button.

So, should the whole header be stretched wide enough to fit both localized Tools and More buttons all the time?
Comment 4 ratijas 2023-12-08 15:16:39 UTC
Note that width of the sidebar is too narrow anyway, and it is not draggable. For example, the "Add page" / "Создать страницу" entry gets elided.
Comment 5 Nate Graham 2023-12-08 16:02:22 UTC
Aha, I can confirm that. Looks like it's just the standard overflow menu behavior. I agree that we should make the sidebar wide enough by default to always accommodate the "Tools" button. Making it resizable would also be a nice touch.
Comment 6 ratijas 2023-12-08 16:03:59 UTC
Maybe just use a fixed RowLayout with two buttons then (kind of like System Settings)?  Why the ActionToolBar if the header is not supposed to be adaptive to an arbitrary amount of buttons?
Comment 7 Nate Graham 2023-12-08 16:07:59 UTC
System Monitor was an early user of ActionToolbar, so I think there was a bit of enthusiasm for the new component.

Also we do want the Tools menu to be in the hamburger menu when the menu is collapsed, which we currently get automatically.
Comment 8 Bug Janitor Service 2023-12-11 11:36:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/244
Comment 9 David Redondo 2023-12-11 12:44:10 UTC
Git commit 0313db0765d6332f45974e0e15e499b31c24d1bf by David Redondo.
Committed on 11/12/2023 at 12:35.
Pushed by davidre into branch 'master'.

Always keep the tools button visible

by basing the size of the drawer on the implicit size of the
action toolbar. By setting all other actions to always hide,
the implicit size is only based on the tools action.
FIXED-IN:6.0

M  +15   -4    src/Main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/0313db0765d6332f45974e0e15e499b31c24d1bf
Comment 10 Arjen Hiemstra 2023-12-21 11:22:38 UTC
*** Bug 453801 has been marked as a duplicate of this bug. ***