Bug 458393 - Kirigami.CategorizedSettings does not produce good results with long words in names
Summary: Kirigami.CategorizedSettings does not produce good results with long words in...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.97.0
Platform: Other Linux
: NOR normal
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-27 16:13 UTC by Papoteur
Modified: 2022-09-23 17:20 UTC (History)
5 users (show)

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


Attachments
NeoChat setting in french (54.11 KB, image/png)
2022-09-03 11:35 UTC, James Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Papoteur 2022-08-27 16:13:43 UTC
SUMMARY
For example we get in French:
Vérification
de
l'orthograp
he
Périphériqu
es



SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Mageia cauldron, release 22.06
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.2
Comment 1 James Graham 2022-09-03 11:32:59 UTC
So this looks like a Kirigami issue issue as NeoChat just uses the standard Kirigami.CategorizedSettings unmodified so it is something we probably need to consider at a library level to make sure that the component produces good looking results even when the words are very long.
Comment 2 James Graham 2022-09-03 11:35:32 UTC
Created attachment 151796 [details]
NeoChat setting in french
Comment 3 Matej Starc 2022-09-10 10:47:54 UTC
I think Kirigami could offer an option in this case that would get the widest word and get the width from that word (in this case, it would make those buttons to access a specific setting page just wide enough for the widest word to fit perfectly without word wrapping).

Thank you for bringing this up!

I think this could be fixed by getting the longest/widest word and getting its width. If this word's width exceeds maximumWidth (newly created property) it would word wrap it, otherwise it can just set the width of categorized settings sidebar, so the longest word fits perfectly.
Comment 4 Matej Starc 2022-09-10 20:25:37 UTC
MR with a fix: https://invent.kde.org/frameworks/kirigami/-/merge_requests/737
Comment 5 Nate Graham 2022-09-23 17:20:31 UTC
Git commit 80e885e71f991c857be673c59a846056ad13f4aa by Nate Graham, on behalf of Matej Starc.
Committed on 23/09/2022 at 17:20.
Pushed by ngraham into branch 'master'.

CategorizedSettings: ensure space for long words and don't wrap in weird places
FIXED-IN: 5.99

M  +48   -14   src/controls/settingscomponents/CategorizedSettings.qml

https://invent.kde.org/frameworks/kirigami/commit/80e885e71f991c857be673c59a846056ad13f4aa