Bug 474199 - 95046311eb4a8be2696ee57776348941315b0632 regresses Elisa's duration and volume sliders
Summary: 95046311eb4a8be2696ee57776348941315b0632 regresses Elisa's duration and volum...
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2023-09-05 22:17 UTC by Nate Graham
Modified: 2023-09-11 18:49 UTC (History)
5 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 Nate Graham 2023-09-05 22:17:42 UTC
Elisa's sliders have Layout.fillHeight: true set on them so that their click areas will be taller than normal without having to re-implement the control from primitives. This gets broken by 95046311eb4a8be2696ee57776348941315b0632.

The commit description suggests that the app shouldn't be doing this, but I don't see a clean way to do it without re-implementing the control. Do you have any ideas, Ivan, or should we revert that change?
Comment 1 ratijas 2023-09-05 22:26:33 UTC
That sounds cursed on Elisa's part. There used to be no guarantees from style regarding how large it actually wanted the control be. Now there are solid guarantees, and they are respected by qqc2-d-s. Stretching a slider in its perpendicular direction is not something most QStyles expect you to do with them.

How about increasing padding instead?
Comment 2 Nate Graham 2023-09-05 22:30:32 UTC
Sure, can you give that a try and see if it will work?
Comment 3 ratijas 2023-09-05 23:12:49 UTC
Actually, I tried all four bundled QStyles again (breeze, O2, Fusion and M$ 9x), and it seems to be a bug in O2/Breeze family.

I'd rather prefer centering them in Breeze, than adding more UI hacks to Elisa — because I found no clean way to extend padding/insets without making assumptions about particular style in use.
Comment 4 Bug Janitor Service 2023-09-06 01:43:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/348
Comment 5 ratijas 2023-09-11 18:49:42 UTC
Git commit 4d40895b8e11bef73b6bf8961856becc95358ed0 by ivan tkachenko.
Committed on 11/09/2023 at 20:47.
Pushed by ratijas into branch 'master'.

Slider: Rework sizing and positioning to draw them centered

If you stretch in its orthogonal direction (vertically for horizontal
and vice-versa), a Slider with Breeze style will now act similar to
Fusion style: it will center itself within given rectangle. But unlike
Fusion, it would also account for Breeze specific tick marks which are
so "small" from QStyle point of view that we have to subtract 2px back.

M  +77   -26   kstyle/breezestyle.cpp
M  +4    -0    kstyle/breezestyle.h

https://invent.kde.org/plasma/breeze/-/commit/4d40895b8e11bef73b6bf8961856becc95358ed0