Skip to content

Commit

Permalink
Set minimum size of AUI dock panels
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Matthew Mott committed Feb 18, 2021
1 parent 28207ee commit 275e8a8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions radiant/ui/mainframe/AuiLayout.cpp
Expand Up @@ -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));
}
}

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 275e8a8

Please sign in to comment.