Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No volume meter with some Qt styles. #75

Closed
wesbluemarine opened this issue Aug 30, 2018 · 4 comments · Fixed by #163 · May be fixed by #98
Closed

No volume meter with some Qt styles. #75

wesbluemarine opened this issue Aug 30, 2018 · 4 comments · Fixed by #163 · May be fixed by #98
Labels

Comments

@wesbluemarine
Copy link

Choosing Windows Qt style, or others (Skulpture) , there is not real time volume indicator on top of the volume slider.

I thought it was an problem of Skulpture theme, so I've opened an issue here

Quoting the dev answer of the developer:

The pavucontrol-qt application hardcodes the height of the QProgressBar widget, see line 41 in https://github.com/lxqt/pavucontrol-qt/blob/master/src/minimalstreamwidget.cc

If it doesn't want to use QStyle::sizeFromContents(), then it could at least query the frame width using QStyle::pixelMetric(PM_DefaultFrameWidth).

System Information
  • Distribution & Version: Opensuse Tumbleweed
  • Kernel: Linux 4.18.5-1
  • Qt Version: Qt 5.11.1
  • libqtxdg Version: 3.1.0
    #* Package version: 0.4.0
@tsujan
Copy link
Member

tsujan commented Aug 30, 2018

That developer's answer is correct. I wanted to report the same thing but, instead, made some changes to Kvantum for this situation to be tolerated by the widget style as far as possible (not 100% though).

In short, this is yet another example of a bad hard-coded style; see lxqt/lxqt#1433 (comment) (but forget about QML).

@tsujan tsujan added the bug label Aug 30, 2018
@tsujan
Copy link
Member

tsujan commented Aug 30, 2018

There are 2 fixes at least:

(1) Simply use the progress-bar provided by the widget style. There's nothing wrong in that. Some styles have thick progress-bars, some others have thin ones and yet, some (only Kvantum) have both.

(2) Draw the progress-bar yourself and completely. But why?!

@palinek palinek mentioned this issue Oct 26, 2018
tsujan added a commit that referenced this issue Aug 16, 2020
If the name is too long, elide it centrally, so that a horizontal scrollbar isn't needed (and isn't shown).

Also, don't force a height on progressbars because some widget styles may not show any bar with a forced height.

Closes #99 and closes #75
tsujan added a commit that referenced this issue Aug 16, 2020
If the name is too long, elide it centrally, so that a horizontal scrollbar isn't needed (and isn't shown).

Also, don't force a height on progressbars because some widget styles may not show any bar with a forced height.

Closes #99 and closes #75
sandsmark pushed a commit to sandsmark/pavucontrol-qt that referenced this issue Feb 12, 2021
    GUI fixes: Elide playback name label if needed and…

    If the name is too long, elide it centrally, so that a horizontal scrollbar isn't needed (and isn't shown).

    Also, don't force a height on progressbars because some widget styles may not show any bar with a forced height.

    Closes lxqt#99 and closes lxqt#75
@sandsmark
Copy link

sandsmark commented Feb 12, 2021

looked into fixing this more "properly" to try to keep a thin progress bar, but at least kvantum seems to "lie" about
subElementRect for the progress bar parts (fusion, which is tall, gives 31px for the groove and contents, while a thin kvantum gives 33px). So can't really use that to see if we need to shrink it.

sandsmark added a commit to sandsmark/pavucontrol-qt that referenced this issue Feb 12, 2021
based on suggested fix from the skulpture author

lxqt#75
@tsujan
Copy link
Member

tsujan commented Feb 12, 2021

kvantum seems to "lie" about subElementRect...

Widget styles don't "lie" about sizes but determine them. See lxqt/lxqt#1433 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants