From 34378ec3ddabd0aa7c0e40427ac90d039868ff1e Mon Sep 17 00:00:00 2001 From: Matthew Mott Date: Wed, 17 Feb 2021 20:34:27 +0000 Subject: [PATCH] AUI panels have captions but no close buttons In theory there is no reason why the panels cannot be closeable, but for now this functionality is disabled since there is no way to show the closed panels again. --- radiant/ui/mainframe/AuiLayout.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/radiant/ui/mainframe/AuiLayout.cpp b/radiant/ui/mainframe/AuiLayout.cpp index 76909d6a3b..5a0f1625f3 100644 --- a/radiant/ui/mainframe/AuiLayout.cpp +++ b/radiant/ui/mainframe/AuiLayout.cpp @@ -22,6 +22,13 @@ namespace ui namespace { const std::string RKEY_ROOT = "user/ui/mainFrame/aui"; + + // Return a pane info with default options + wxAuiPaneInfo DEFAULT_PANE_INFO(const std::string& caption) + { + return wxAuiPaneInfo().Caption(caption).Floatable().Dockable().Dock() + .CloseButton(false); + } } AuiLayout::AuiLayout() @@ -79,9 +86,12 @@ void AuiLayout::activate() // Add the camera and notebook to the left, as with the Embedded layout, and // the 2D view on the right - _auiMgr.AddPane(_camWnd->getMainWidget(), wxAuiPaneInfo().Left().Dockable().Dock()); - _auiMgr.AddPane(notebookPanel, wxAuiPaneInfo().Left().Dockable().Dock()); - _auiMgr.AddPane(xywnd->getGLWidget(), wxAuiPaneInfo().Right().Dockable().Dock()); + _auiMgr.AddPane(_camWnd->getMainWidget(), + DEFAULT_PANE_INFO(_("Camera")).Left()); + _auiMgr.AddPane(notebookPanel, + DEFAULT_PANE_INFO(_("Properties")).Left()); + _auiMgr.AddPane(xywnd->getGLWidget(), + DEFAULT_PANE_INFO(_("2D View")).Right()); _auiMgr.Update(); topLevelParent->Layout();