Skip to content

Commit

Permalink
#6131: Increase default camera width when no settings are present
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 26, 2022
1 parent b13c593 commit e188719
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion radiant/ui/mainframe/AuiLayout.cpp
Expand Up @@ -261,14 +261,22 @@ void AuiLayout::activate()
wxSize size = topLevelParent->GetSize();
size.Scale(0.5, 1.0);

addPane(cameraControl->getControlName(), cameraControl->createWidget(managedArea),
// Force a minimum width of the camera
auto camera = cameraControl->createWidget(managedArea);
auto previousMinSize = camera->GetMinSize();
camera->SetMinSize(wxSize(600, -1));

addPane(cameraControl->getControlName(), camera,
DEFAULT_PANE_INFO(cameraControl->getDisplayName(), size).Left().Position(0));
addPane("PropertiesPanel", _propertyNotebook,
DEFAULT_PANE_INFO(_("Properties"), size).Left().Position(1).CloseButton(false).DestroyOnClose(false));
addPane(orthoViewControl->getControlName(), orthoViewControl->createWidget(managedArea),
DEFAULT_PANE_INFO(orthoViewControl->getDisplayName(), size).CenterPane());
_auiMgr.Update();

// Reset the camera min size
camera->SetMinSize(previousMinSize);

// 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 e188719

Please sign in to comment.