diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index c8895710e..86e2d5236 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -157,6 +157,8 @@ type GuiConfig struct { // Status panel view. // One of 'dashboard' (default) | 'allBranchesLog' StatusPanelView string `yaml:"statusPanelView" jsonschema:"enum=dashboard,enum=allBranchesLog"` + // Horizontal padding between views that are next to each other. + HorizontalPadding int `yaml:"horizontalPadding"` } func (c *GuiConfig) UseFuzzySearch() bool { @@ -702,7 +704,8 @@ func GetDefaultConfig() *UserConfig { Frames: []string{"|", "/", "-", "\\"}, Rate: 50, }, - StatusPanelView: "dashboard", + StatusPanelView: "dashboard", + HorizontalPadding: 0, }, Git: GitConfig{ Paging: PagingConfig{ diff --git a/pkg/gui/controllers/helpers/window_arrangement_helper.go b/pkg/gui/controllers/helpers/window_arrangement_helper.go index 0eb7cdb4a..f5380a546 100644 --- a/pkg/gui/controllers/helpers/window_arrangement_helper.go +++ b/pkg/gui/controllers/helpers/window_arrangement_helper.go @@ -125,8 +125,10 @@ func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimens sideSectionWeight, mainSectionWeight := getMidSectionWeights(args) sidePanelsDirection := boxlayout.COLUMN + sidePanelsPadding := args.UserConfig.Gui.HorizontalPadding if shouldUsePortraitMode(args) { sidePanelsDirection = boxlayout.ROW + sidePanelsPadding = 0 } showInfoSection := args.UserConfig.Gui.ShowBottomLine || @@ -143,6 +145,7 @@ func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimens Children: []*boxlayout.Box{ { Direction: sidePanelsDirection, + Padding: sidePanelsPadding, Weight: 1, Children: []*boxlayout.Box{ { @@ -173,13 +176,16 @@ func GetWindowDimensions(args WindowArrangementArgs) map[string]boxlayout.Dimens func mainPanelChildren(args WindowArrangementArgs) []*boxlayout.Box { mainPanelsDirection := boxlayout.ROW + mainPanelsPadding := 0 if splitMainPanelSideBySide(args) { mainPanelsDirection = boxlayout.COLUMN + mainPanelsPadding = args.UserConfig.Gui.HorizontalPadding } result := []*boxlayout.Box{ { Direction: mainPanelsDirection, + Padding: mainPanelsPadding, Children: mainSectionChildren(args), Weight: 1, }, diff --git a/schema/config.json b/schema/config.json index cf25ce007..a54706daa 100644 --- a/schema/config.json +++ b/schema/config.json @@ -430,6 +430,10 @@ ], "description": "Status panel view.\nOne of 'dashboard' (default) | 'allBranchesLog'", "default": "dashboard" + }, + "horizontalPadding": { + "type": "integer", + "description": "Horizontal padding between views that are next to each other." } }, "additionalProperties": false,