From 79f1edc6f01e162a36038f984dcf8fa47c8d8d44 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 14 Feb 2017 15:27:32 +0000 Subject: [PATCH] When dragging off a tab/tabs to a new float window, default to same size * This isn't perfect, but it at least prevents the case where you drag off a full-size panel and the new window is tiny and crushed. --- .../3rdparty/toolwindowmanager/ToolWindowManager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp index 6e5fabedc..1775cebed 100644 --- a/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp +++ b/qrenderdoc/3rdparty/toolwindowmanager/ToolWindowManager.cpp @@ -812,7 +812,17 @@ void ToolWindowManager::finishDrag() { } if (m_suggestions.isEmpty()) { if (m_allowFloatingWindow) + { + QRect r; + for(QWidget *w : m_draggedToolWindows) + r = r.united(w->rect()); + moveToolWindows(m_draggedToolWindows, NewFloatingArea); + + ToolWindowManagerArea *area = areaOf(m_draggedToolWindows[0]); + + area->parentWidget()->resize(r.size()); + } } else { if (m_dropCurrentSuggestionIndex >= m_suggestions.count()) { qWarning("invalid m_dropCurrentSuggestionIndex");