Skip to content

Commit

Permalink
AUI panels have captions but no close buttons
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Matthew Mott committed Feb 17, 2021
1 parent 50b4ac0 commit 34378ec
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions radiant/ui/mainframe/AuiLayout.cpp
Expand Up @@ -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()
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 34378ec

Please sign in to comment.