Project

General

Profile

Support #1074

slider visual style mismatch

Added by asd fgh 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Minor
Assignee:
-
Category:
-
Start date:
February 23, 2021
Due date:
% Done:

0%

Estimated time:
Affects version:

Description

4.05

4.1

in addition equalizer looks normal on 4.1

volume_button.patch (1.15 KB) volume_button.patch Thomas Lange, March 19, 2021 20:27

History

#1 Updated by Thomas Lange 9 months ago

Do you mean the dotted rectangle which looks odd around the slider?

There is no clean solution to remove this.
Setting the focus policy to NoFocus hides it obviously, but the slider no longer reacts to the keyboard (cursor keys, page up/down).
The attached patch fixes it by using a custom style, but I am not sure if we want to add this "workaround".

See also:
https://stackoverflow.com/questions/9795791
https://www.qtcentre.org/threads/60363-Removing-dotted-outline-during-focus

#3 Updated by asd fgh 8 months ago

thanks for answer i had no guess what is this thing called

to make sure it's not my fault i have added this line to code

wprintf(L"patch applied %hs\n", __TIME__);

sadly patch didn't worked drawPrimitive pre-processor isn't called but removing call to m_slider.setFocus and setting nofocus policy works fine i'll use it for now

in addition "outline: 0" doesn't works but possibly i have done something wrong i don't have any Qt experience and something i found https://stackoverflow.com/questions/62258966/removing-focus-border-from-qslider-in-pyqt

#4 Updated by John Lindgren 8 months ago

  • Tracker changed from Bug to Support

#5 Updated by John Lindgren 8 months ago

  • Status changed from New to Closed

I'd personally vote that we leave this up to the Qt style. Fusion for one already doesn't draw a focus rectangle.
I'm going to go ahead and close this.

Also available in: Atom PDF