Improved initial size of floating dock widget

This commit is contained in:
Uwe Kindler 2021-07-30 13:50:17 +02:00
parent 83cdc69fc8
commit 401e8cf492

View File

@ -133,7 +133,9 @@ void DockWidgetPrivate::showDockWidget()
if (!DockArea) if (!DockArea)
{ {
CFloatingDockContainer* FloatingWidget = new CFloatingDockContainer(_this); CFloatingDockContainer* FloatingWidget = new CFloatingDockContainer(_this);
FloatingWidget->resize(_this->size()); // We use the size hint of the content widget to provide a good
// initial size
FloatingWidget->resize(Widget ? Widget->sizeHint() : _this->sizeHint());
TabWidget->show(); TabWidget->show();
FloatingWidget->show(); FloatingWidget->show();
} }