Skip to content

Commit 401e8cf

Browse files
Improved initial size of floating dock widget
1 parent 83cdc69 commit 401e8cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DockWidget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ void DockWidgetPrivate::showDockWidget()
133133
if (!DockArea)
134134
{
135135
CFloatingDockContainer* FloatingWidget = new CFloatingDockContainer(_this);
136-
FloatingWidget->resize(_this->size());
136+
// We use the size hint of the content widget to provide a good
137+
// initial size
138+
FloatingWidget->resize(Widget ? Widget->sizeHint() : _this->sizeHint());
137139
TabWidget->show();
138140
FloatingWidget->show();
139141
}

0 commit comments

Comments
 (0)