Commit 231524d8 authored by Clément Fauconnier's avatar Clément Fauconnier

fixed an issue with the position of the right palette tab

parent 812b446f
...@@ -239,15 +239,6 @@ void UBDockPalette::paintEvent(QPaintEvent *event) ...@@ -239,15 +239,6 @@ void UBDockPalette::paintEvent(QPaintEvent *event)
path.addRect(0.0, 0.0, width(), height()); 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); painter.drawPath(path);
} }
} }
...@@ -447,6 +438,7 @@ void UBDockPalette::onShowTabWidget(UBDockPaletteWidget* widget) ...@@ -447,6 +438,7 @@ void UBDockPalette::onShowTabWidget(UBDockPaletteWidget* widget)
{ {
widget->setVisibleState(true); widget->setVisibleState(true);
addTab(widget); addTab(widget);
moveTabs();
} }
} }
...@@ -460,6 +452,7 @@ void UBDockPalette::onHideTabWidget(UBDockPaletteWidget* widget) ...@@ -460,6 +452,7 @@ void UBDockPalette::onHideTabWidget(UBDockPaletteWidget* widget)
{ {
widget->setVisibleState(false); widget->setVisibleState(false);
removeTab(widget); removeTab(widget);
moveTabs();
} }
} }
...@@ -524,6 +517,7 @@ void UBDockPalette::moveTabs() ...@@ -524,6 +517,7 @@ void UBDockPalette::moveTabs()
case eUBDockOrientation_Right: case eUBDockOrientation_Right:
if (parentWidget()) { if (parentWidget()) {
origin.setX(parentWidget()->width() - width() - border() * 2); origin.setX(parentWidget()->width() - width() - border() * 2);
origin.setY(parentWidget()->height() - border()- mTabWidgets.size() * TABSIZE);
} }
break; break;
case eUBDockOrientation_Top: ; case eUBDockOrientation_Top: ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment