Bug 468485

Summary: TabButton Component: Single-word labels can awkwardly wrap within a word
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Justin Zobel <justin.zobel>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: nate, notmart
Priority: NOR    
Version First Reported In: 5.104.0   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Justin Zobel 2023-04-14 00:11:58 UTC
See Screenshot

The app is Marknote, initially reported on Gitlab[1] with a screenshot.

1 https://invent.kde.org/mbruchert/marknote/-/issues/19#note_661510
Comment 1 Nate Graham 2023-04-14 14:21:25 UTC
From the image I see in https://invent.kde.org/mbruchert/marknote/-/issues/19, I'm unsure how this could be generically fixed. If there isn't enough horizontal space to display a whole word, *something* has to happen. If that something is wrapping, then the word inevitably has to be wrapped somewhere in the middle.

The component could be changed to have a larger minimum width, or to do something fancy and have a minimum width that's guaranteed to be wide enough to prevent wrapping any single-word labels within a word. As a consequence, this would reduce design flexibility for app developers because they wouldn't be able to precisely control the width of the component anymore. Or the *implicit* width could use that calculation and app developers could override it, but then the bug could just re-appear.