Bug 488743

Summary: [Feature Request] Implement `AbstractButton.TextUnderIcon` display mode for QQC2.Button (despite QStyle not having a 1:1 matching API for that)
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: Michael Alexsander <michaelalexsander>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: ahiemstra, kde, nate, noahadvs, notmart
Priority: LO    
Version First Reported In: 6.3.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Michael Alexsander 2024-06-19 16:08:59 UTC
SUMMARY
Using the `AbstractButton.TextUnderIcon` display mode in buttons doesn't work anymore.

STEPS TO REPRODUCE
1. Set `display: AbstractButton.TextUnderIcon` in a `Button` element on QML.
2. Build the application, see that it didn't change anything.

OBSERVED RESULT
Text is still to the side of the icon.

EXPECTED RESULT
For text to be below the icon.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Kinoite 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Comment 1 Nate Graham 2024-06-19 20:02:03 UTC
Yeah, it's broken. :/
Comment 2 ratijas 2024-06-20 05:20:38 UTC
Have it even worked for a Button though? It's only implemented for ToolButton, because if I recall correctly those two types have surprisingly different API in QStyle which does the actual work.
Comment 3 Michael Alexsander 2024-06-20 05:25:35 UTC
(In reply to ratijas from comment #2)
> Have it even worked for a Button though? It's only implemented for
> ToolButton, because if I recall correctly those two types have surprisingly
> different API in QStyle which does the actual work.

You can see it working in the Kirigami Gallery ("Misc. Widgets" section), sort of...

https://i.ibb.co/Sv8Tcky/Screenshot-20240620-022230.png
Comment 4 ratijas 2024-06-22 08:29:53 UTC
I'm not at my laptop right now, but I'm almost sure those are ToolButton instances
Comment 5 ratijas 2024-06-22 08:33:39 UTC
Indeed, that is a regular ActionToolBar without any custom display component in it's actions, meaning what you are showing are ToolButtons.

https://github.com/KDE/kirigami-gallery/blob/11761e467bd78291063fce77c20127e4215a1f62/src/data/contents/ui/gallery/MiscGallery.qml#L66
Comment 6 Michael Alexsander 2024-06-23 03:53:54 UTC
(In reply to ratijas from comment #5)
> Indeed, that is a regular ActionToolBar without any custom display component
> in it's actions, meaning what you are showing are ToolButtons.
> 
> https://github.com/KDE/kirigami-gallery/blob/
> 11761e467bd78291063fce77c20127e4215a1f62/src/data/contents/ui/gallery/
> MiscGallery.qml#L66

You're right, I didn't notice that, so my bad. :/
So, I guess this is a feature request rather than a bug. Should I delete this, or just re-word it?
Comment 7 ratijas 2024-06-23 05:12:03 UTC
It is a feature request then. I'll reword the title. Pretty sure you can delete anything here, and neither can I, nor.should.it be needed.