You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a custom QTabWidget similar to the one in Qt Creator that have different modes, the default one is a vertical tab widget similar to the one you see in Qt Creator.
There is a style issue with adwaita where the tabs are stretched from top to bottom, empty space between icons and text.
I've found that this is caused by the height in subElementRect() for QStyle::SE_TabWidgetTabBar is returning the height of the whole tabwidget, instead of the height of the contents (all tabs) like Fusion and other Qt styles including the KDE ones.
With adwaita it looks like this:
With all other Qt styles it looks correct like this:
I made a workaround for awaita by overriding subElementRect() using QCommonStyle instead.
Here is the code including the override I did specifically for awaita.
I'm using a custom QTabWidget similar to the one in Qt Creator that have different modes, the default one is a vertical tab widget similar to the one you see in Qt Creator.
There is a style issue with adwaita where the tabs are stretched from top to bottom, empty space between icons and text.
I've found that this is caused by the height in subElementRect() for QStyle::SE_TabWidgetTabBar is returning the height of the whole tabwidget, instead of the height of the contents (all tabs) like Fusion and other Qt styles including the KDE ones.
With adwaita it looks like this:
With all other Qt styles it looks correct like this:
I made a workaround for awaita by overriding subElementRect() using QCommonStyle instead.
Here is the code including the override I did specifically for awaita.
The full code is on GitHub here:
https://github.com/strawberrymusicplayer/strawberry/blob/master/src/widgets/fancytabwidget.cpp
To test without the hack, remove setStyle(style_); in the FancyTabWidget constructor.
The text was updated successfully, but these errors were encountered: