From 231524d88736173bc29936cc0fd5ba02f0dfee1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Tue, 18 Sep 2018 16:02:27 +0200 Subject: [PATCH] fixed an issue with the position of the right palette tab --- src/gui/UBDockPalette.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gui/UBDockPalette.cpp b/src/gui/UBDockPalette.cpp index 0bdad23f..6660e3a5 100644 --- a/src/gui/UBDockPalette.cpp +++ b/src/gui/UBDockPalette.cpp @@ -239,15 +239,6 @@ void UBDockPalette::paintEvent(QPaintEvent *event) path.addRect(0.0, 0.0, width(), height()); } - // THEN DRAW THE small tabs (yes, the tabs are small...) - if(eUBDockTabOrientation_Up == mTabsOrientation) - { - mHTab = border(); - } - else - { - mHTab = height() - border() - nbTabs*TABSIZE - (nbTabs-1)*tabSpacing(); - } painter.drawPath(path); } } @@ -447,6 +438,7 @@ void UBDockPalette::onShowTabWidget(UBDockPaletteWidget* widget) { widget->setVisibleState(true); addTab(widget); + moveTabs(); } } @@ -460,6 +452,7 @@ void UBDockPalette::onHideTabWidget(UBDockPaletteWidget* widget) { widget->setVisibleState(false); removeTab(widget); + moveTabs(); } } @@ -524,6 +517,7 @@ void UBDockPalette::moveTabs() case eUBDockOrientation_Right: if (parentWidget()) { origin.setX(parentWidget()->width() - width() - border() * 2); + origin.setY(parentWidget()->height() - border()- mTabWidgets.size() * TABSIZE); } break; case eUBDockOrientation_Top: ;