From 275e8a81501575dd34c2ed15d5a8d2184d101d74 Mon Sep 17 00:00:00 2001 From: Matthew Mott Date: Thu, 18 Feb 2021 20:27:06 +0000 Subject: [PATCH] Set minimum size of AUI dock panels Setting a minimum size of 128x128 at least means the panels are clearly visible at the beginning rather than squashed to only a few pixels in width. --- radiant/ui/mainframe/AuiLayout.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/radiant/ui/mainframe/AuiLayout.cpp b/radiant/ui/mainframe/AuiLayout.cpp index 45d3ad8d48..e3e6ade097 100644 --- a/radiant/ui/mainframe/AuiLayout.cpp +++ b/radiant/ui/mainframe/AuiLayout.cpp @@ -26,8 +26,8 @@ namespace // Return a pane info with default options wxAuiPaneInfo DEFAULT_PANE_INFO(const std::string& caption) { - return wxAuiPaneInfo().Caption(caption).Floatable().Dockable().Dock() - .CloseButton(false); + return wxAuiPaneInfo().Caption(caption).Layer(1).CloseButton(false) + .MinSize(wxSize(128, 128)); } } @@ -50,7 +50,6 @@ void AuiLayout::activate() // container wxWindow* managedArea = new wxWindow(topLevelParent, wxID_ANY); _auiMgr.SetManagedWindow(managedArea); - GlobalMainFrame().getWxMainContainer()->Add(managedArea, 1, wxEXPAND); // Allocate a new OrthoView and set its ViewType to XY @@ -94,8 +93,6 @@ void AuiLayout::activate() DEFAULT_PANE_INFO(_("2D View")).Right()); _auiMgr.Update(); - topLevelParent->Layout(); - // Hide the camera toggle option for non-floating views GlobalMenuManager().setVisibility("main/view/cameraview", false); // Hide the console/texture browser toggles for non-floating/non-split views