diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-03 14:54:55 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch) | |
tree | 90e28657c0af72cd0a880842f88750c01a32834d /pkg/gui/arrangement.go | |
parent | 9440dcf9de3214927125693e512cdc941ca4e123 (diff) |
remove viper
WIP
Diffstat (limited to 'pkg/gui/arrangement.go')
-rw-r--r-- | pkg/gui/arrangement.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/arrangement.go b/pkg/gui/arrangement.go index 59fa87a01..6c7e3e067 100644 --- a/pkg/gui/arrangement.go +++ b/pkg/gui/arrangement.go @@ -42,7 +42,7 @@ func (gui *Gui) getMidSectionWeights() (int, int) { currentWindow := gui.currentWindow() // we originally specified this as a ratio i.e. .20 would correspond to a weight of 1 against 4 - sidePanelWidthRatio := gui.Config.GetUserConfig().GetFloat64("gui.sidePanelWidth") + sidePanelWidthRatio := gui.Config.GetUserConfig().Gui.SidePanelWidth // we could make this better by creating ratios like 2:3 rather than always 1:something mainSectionWeight := int(1/sidePanelWidthRatio) - 1 sideSectionWeight := 1 @@ -133,7 +133,7 @@ func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map }, { ConditionalDirection: func(width int, height int) int { - mainPanelSplitMode := gui.Config.GetUserConfig().GetString("gui.mainPanelSplitMode") + mainPanelSplitMode := gui.Config.GetUserConfig().Gui.MainPanelSplitMode switch mainPanelSplitMode { case "vertical": @@ -213,7 +213,7 @@ func (gui *Gui) sidePanelChildren(width int, height int) []*boxlayout.Box { fullHeightBox("stash"), } } else if height >= 28 { - accordianMode := gui.Config.GetUserConfig().GetBool("gui.expandFocusedSidePanel") + accordianMode := gui.Config.GetUserConfig().Gui.ExpandFocusedSidePanel accordianBox := func(defaultBox *boxlayout.Box) *boxlayout.Box { if accordianMode && defaultBox.Window == currentWindow { return &boxlayout.Box{ |