diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-18 08:26:40 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 0f7b2c45d773989229cb84a0147232962c6ae0e0 (patch) | |
tree | bec3948a7cc786d5d7fb6cf5cb2e6b14a832f6a8 /pkg/gui/arrangement.go | |
parent | a12d18146ccd2847ef04377703baff58e209373d (diff) |
centralise split main panel code
Diffstat (limited to 'pkg/gui/arrangement.go')
-rw-r--r-- | pkg/gui/arrangement.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/arrangement.go b/pkg/gui/arrangement.go index 49311b6d4..13148a3c6 100644 --- a/pkg/gui/arrangement.go +++ b/pkg/gui/arrangement.go @@ -10,7 +10,7 @@ func (gui *Gui) mainSectionChildren() []*boxlayout.Box { // if we're not in split mode we can just show the one main panel. Likewise if // the main panel is focused and we're in full-screen mode - if !gui.State.SplitMainPanel || (gui.State.ScreenMode == SCREEN_FULL && currentViewName == "main") { + if !gui.isMainPanelSplit() || (gui.State.ScreenMode == SCREEN_FULL && currentViewName == "main") { return []*boxlayout.Box{ { ViewName: "main", @@ -47,7 +47,7 @@ func (gui *Gui) getMidSectionWeights() (int, int) { mainSectionWeight := int(1/sidePanelWidthRatio) - 1 sideSectionWeight := 1 - if gui.State.SplitMainPanel { + if gui.isMainPanelSplit() { mainSectionWeight = 5 // need to shrink side panel to make way for main panels if side-by-side } |