mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Add user config expandedSidePanelWeight
This commit is contained in:
@@ -443,7 +443,7 @@ func sidePanelChildren(args WindowArrangementArgs) func(width int, height int) [
|
||||
if accordionMode && defaultBox.Window == args.CurrentSideWindow {
|
||||
return &boxlayout.Box{
|
||||
Window: defaultBox.Window,
|
||||
Weight: 2,
|
||||
Weight: args.UserConfig.Gui.ExpandedSidePanelWeight,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,47 @@ func TestGetWindowDimensions(t *testing.T) {
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "expandSidePanelWeight",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
args.UserConfig.Gui.ExpandFocusedSidePanel = true
|
||||
args.UserConfig.Gui.ExpandedSidePanelWeight = 4
|
||||
},
|
||||
expected: `
|
||||
╭status─────────────────╮╭main────────────────────────────────────────────╮
|
||||
│ ││ │
|
||||
╰───────────────────────╯│ │
|
||||
╭files──────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯│ │
|
||||
╭branches───────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯│ │
|
||||
╭commits────────────────╮│ │
|
||||
│ ││ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯│ │
|
||||
╭stash──────────────────╮│ │
|
||||
│ ││ │
|
||||
╰───────────────────────╯╰────────────────────────────────────────────────╯
|
||||
<options──────────────────────────────────────────────────────>A<B────────>
|
||||
A: statusSpacer1
|
||||
B: information
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "half screen mode, enlargedSideViewLocation left",
|
||||
mutateArgs: func(args *WindowArrangementArgs) {
|
||||
|
||||
Reference in New Issue
Block a user