Bug 397337 - QToolButton painting outside widget when smaller than minimum size hint
Summary: QToolButton painting outside widget when smaller than minimum size hint
Status: RESOLVED WORKSFORME
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-10 11:21 UTC by chimak111
Modified: 2022-03-25 04:35 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chimak111 2018-08-10 11:21:16 UTC
I came across Panel buttons are cut off on both sides with breeze theme #1525 (https://github.com/lxqt/lxqt/issues/1525). In a comment (https://github.com/lxqt/lxqt/issues/1525#issuecomment-406907067), one of the LXQt members closed the issue with "If someone is willing to report the issue to the KDE bug tracker, he/she could quote this comment."

To quote partially from the comment: "Every style should be prepared for cases where there isn't enough space for a widget's contents. Breeze isn't, in this case. The following piece of code, inside breezestyle.cpp → Style::drawToolButtonLabelControl, is wrong:"

And: "Other widget styles put the icon at the left side of the real rectangle (with some spacing) and draw the text after it, so that if the button width isn't enough for it, the text will be cut (Kvantum even elides the text in such cases). We've added a simple code for the task-button, so that the text will be elided with all styles as far as possible. However, KDE didn't deal with such a scenario in Oxygen's code and the problem is inherited by Breeze."

I don't know anything about Breeze internals but I hope this will be useful information for Breeze developers.

Thanks!
Comment 1 David Edmundson 2018-08-10 12:16:51 UTC
Thanks

Them calling it a breeze bug is quite a stretch. They're showing a control smaller than a controls minimumSizeHint. They're right Qt doesn't enforce it...because that's the job of the app dev. Any control will break if you do that.

Fwiw: their code

https://github.com/lxqt/lxqt-panel/blob/master/plugin-taskbar/Lady task button.cpp


But the workaround in their github seems sane and won't harm us. May as well merge.
Comment 3 Janet Blackquill 2022-02-23 18:24:11 UTC
Does this still have any bearing on Breeze? Forcing a widget below its minimum size is pretty much guaranteed to break things, as David said.
Comment 4 Bug Janitor Service 2022-03-10 04:35:38 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-03-25 04:35:10 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!