mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fixed wrong position of AutoHideDockContainer when uncollapsing
This commit is contained in:
parent
11223bf664
commit
f20c3bc63a
@ -216,30 +216,30 @@ void CAutoHideDockContainer::updateSize()
|
|||||||
switch (sideTabBarArea())
|
switch (sideTabBarArea())
|
||||||
{
|
{
|
||||||
case SideBarLocation::Top:
|
case SideBarLocation::Top:
|
||||||
move(rect.topLeft());
|
|
||||||
resize(rect.width(), qMin(rect.height(), d->Size.height()));
|
resize(rect.width(), qMin(rect.height(), d->Size.height()));
|
||||||
|
move(rect.topLeft());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SideBarLocation::Left:
|
case SideBarLocation::Left:
|
||||||
move(rect.topLeft());
|
|
||||||
resize(qMin(d->Size.width(), rect.width()), rect.height());
|
resize(qMin(d->Size.width(), rect.width()), rect.height());
|
||||||
|
move(rect.topLeft());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SideBarLocation::Right:
|
case SideBarLocation::Right:
|
||||||
{
|
{
|
||||||
|
resize(qMin(d->Size.width(), rect.width()), rect.height());
|
||||||
QPoint p = rect.topRight();
|
QPoint p = rect.topRight();
|
||||||
p.rx() -= (width() - 1);
|
p.rx() -= (width() - 1);
|
||||||
move(p);
|
move(p);
|
||||||
resize(qMin(d->Size.width(), rect.width()), rect.height());
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SideBarLocation::Bottom:
|
case SideBarLocation::Bottom:
|
||||||
{
|
{
|
||||||
|
resize(rect.width(), qMin(rect.height(), d->Size.height()));
|
||||||
QPoint p = rect.bottomLeft();
|
QPoint p = rect.bottomLeft();
|
||||||
p.ry() -= (height() - 1);
|
p.ry() -= (height() - 1);
|
||||||
move(p);
|
move(p);
|
||||||
resize(rect.width(), qMin(rect.height(), d->Size.height()));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -404,18 +404,14 @@ void CAutoHideDockContainer::collapseView(bool Enable)
|
|||||||
if (Enable)
|
if (Enable)
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
d->DockArea->hide();
|
|
||||||
d->DockWidget->hide();
|
|
||||||
qApp->removeEventFilter(this);
|
qApp->removeEventFilter(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
updateSize();
|
||||||
d->updateResizeHandleSizeLimitMax();
|
d->updateResizeHandleSizeLimitMax();
|
||||||
raise();
|
raise();
|
||||||
show();
|
show();
|
||||||
d->DockArea->show();
|
|
||||||
d->DockWidget->show();
|
|
||||||
updateSize();
|
|
||||||
d->DockManager->setDockWidgetFocused(d->DockWidget);
|
d->DockManager->setDockWidgetFocused(d->DockWidget);
|
||||||
qApp->installEventFilter(this);
|
qApp->installEventFilter(this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user