mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-30 00:55:33 +01:00
Adjust fancy tabbar size
This commit is contained in:
parent
938811f24f
commit
b0fabd7897
@ -140,11 +140,11 @@ class FancyTabBar: public QTabBar {
|
|||||||
int w = 0;
|
int w = 0;
|
||||||
int h = 0;
|
int h = 0;
|
||||||
if (tabWidget->mode() == FancyTabWidget::Mode_Tabs) {
|
if (tabWidget->mode() == FancyTabWidget::Mode_Tabs) {
|
||||||
w = FancyTabWidget::IconSize_SmallSidebar + rect.width() + 20;
|
w = FancyTabWidget::IconSize_SmallSidebar + rect.width() + 10;
|
||||||
h = FancyTabWidget::IconSize_SmallSidebar + rect.height() + 5;
|
h = std::max(FancyTabWidget::IconSize_SmallSidebar, rect.height()) + 15;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
w = FancyTabWidget::IconSize_SmallSidebar + rect.height() + 5;
|
w = std::max(FancyTabWidget::IconSize_SmallSidebar, rect.height()) + 15;
|
||||||
h = FancyTabWidget::IconSize_SmallSidebar + rect.width() + 20;
|
h = FancyTabWidget::IconSize_SmallSidebar + rect.width() + 20;
|
||||||
}
|
}
|
||||||
size = QSize(w, h);
|
size = QSize(w, h);
|
||||||
@ -286,7 +286,8 @@ class FancyTabBar: public QTabBar {
|
|||||||
tabrectLabel = QRect(QPoint(0, 0), m.mapRect(tabrect).size());
|
tabrectLabel = QRect(QPoint(0, 0), m.mapRect(tabrect).size());
|
||||||
|
|
||||||
tabrectText = tabrectLabel;
|
tabrectText = tabrectLabel;
|
||||||
tabrectText.translate(FancyTabWidget::IconSize_SmallSidebar + 8, -5);
|
tabrectText.translate(FancyTabWidget::IconSize_SmallSidebar + 8, -2);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m = QTransform::fromTranslate(tabrect.left(), tabrect.top());
|
m = QTransform::fromTranslate(tabrect.left(), tabrect.top());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user