From f20c3bc63a3755b12a86e9dd10309cddd9c85fff Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Thu, 27 Oct 2022 10:52:05 +0200 Subject: [PATCH] Fixed wrong position of AutoHideDockContainer when uncollapsing --- src/AutoHideDockContainer.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/AutoHideDockContainer.cpp b/src/AutoHideDockContainer.cpp index 51e00cb..6768a23 100644 --- a/src/AutoHideDockContainer.cpp +++ b/src/AutoHideDockContainer.cpp @@ -216,30 +216,30 @@ void CAutoHideDockContainer::updateSize() switch (sideTabBarArea()) { case SideBarLocation::Top: - move(rect.topLeft()); resize(rect.width(), qMin(rect.height(), d->Size.height())); + move(rect.topLeft()); break; case SideBarLocation::Left: - move(rect.topLeft()); resize(qMin(d->Size.width(), rect.width()), rect.height()); + move(rect.topLeft()); break; case SideBarLocation::Right: { + resize(qMin(d->Size.width(), rect.width()), rect.height()); QPoint p = rect.topRight(); p.rx() -= (width() - 1); move(p); - resize(qMin(d->Size.width(), rect.width()), rect.height()); } break; case SideBarLocation::Bottom: { + resize(rect.width(), qMin(rect.height(), d->Size.height())); QPoint p = rect.bottomLeft(); p.ry() -= (height() - 1); move(p); - resize(rect.width(), qMin(rect.height(), d->Size.height())); } break; } @@ -404,18 +404,14 @@ void CAutoHideDockContainer::collapseView(bool Enable) if (Enable) { hide(); - d->DockArea->hide(); - d->DockWidget->hide(); qApp->removeEventFilter(this); } else { + updateSize(); d->updateResizeHandleSizeLimitMax(); raise(); show(); - d->DockArea->show(); - d->DockWidget->show(); - updateSize(); d->DockManager->setDockWidgetFocused(d->DockWidget); qApp->installEventFilter(this); }