Bug 464910

Summary: header/toolbar does not become tall enough for "Text Under Icon" tool button style
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: ratijas <me>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: notmart
Priority: NOR    
Version First Reported In: Master   
Target Milestone: Not decided   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kirigami Gallery - text under icon

Description ratijas 2023-01-27 18:36:55 UTC
Created attachment 155707 [details]
Kirigami Gallery - text under icon

SUMMARY

Looks broken, both in KF5 and KF6. Header is not tall enough.

STEPS TO REPRODUCE
1. Open Kirigami Gallery.
2. Navigate to «Misc. Widgets» page.
3. Click «Text Under Icon» tool button on top.

OBSERVED RESULT
Buttons are squashed.

EXPECTED RESULT
Header should expand to accommodate new button style.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: git-kf5, git-master
Qt Version: 5.15.8
Kernel Version: 6.1.7-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-02-02 14:31:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/955
Comment 2 Arjen Hiemstra 2023-02-07 11:39:50 UTC
Git commit 2d3bc53ef63ad54cfa6b653165e7f04ef481e8b2 by Arjen Hiemstra.
Committed on 06/02/2023 at 14:50.
Pushed by ahiemstra into branch 'master'.

ToolBarLayout: Split up implicit size calculation and layouting

If an explicit height is set, we need to make sure to use it for
delegate's height. Unfortunately, Control unconditionally sets the
contentItem's height, which makes QQuickItem::heightValid() rather
useless. By separating the layouting from the size calculation, we can
have the layouting make use of the width/height of the item rather than
relying on previously calculated values, making it always use the right
value.

M  +81   -41   src/toolbarlayout.cpp

https://invent.kde.org/frameworks/kirigami/commit/2d3bc53ef63ad54cfa6b653165e7f04ef481e8b2