1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

allow configuring side panel width

This commit is contained in:
Jesse Duffield
2020-03-04 00:08:34 +11:00
parent 0abd7ad6be
commit 31e201ca52
3 changed files with 5 additions and 1 deletions

View File

@ -520,11 +520,13 @@ func (gui *Gui) layout(g *gocui.Gui) error {
_, _ = g.SetViewOnBottom("limit")
g.DeleteView("limit")
sidePanelWidthRatio := gui.Config.GetUserConfig().GetFloat64("gui.sidePanelWidth")
textColor := theme.GocuiDefaultTextColor
var leftSideWidth int
switch gui.State.ScreenMode {
case SCREEN_NORMAL:
leftSideWidth = width / 3
leftSideWidth = int(float64(width) * sidePanelWidthRatio)
case SCREEN_HALF:
leftSideWidth = width / 2
case SCREEN_FULL: