From 8aba9b70860691168ae45738f9648ce1da02552a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 15 Nov 2026 16:42:48 +0100 Subject: [PATCH] Extract building the window arrangement args into a method The drag handle for resizing the side panels needs to know the current layout, too. Co-Authored-By: Claude Opus 5.5 --- pkg/gui/controllers/helpers/window_arrangement_helper.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/gui/controllers/helpers/window_arrangement_helper.go b/pkg/gui/controllers/helpers/window_arrangement_helper.go index 03a15363a..da7c348b2 100644 --- a/pkg/gui/controllers/helpers/window_arrangement_helper.go +++ b/pkg/gui/controllers/helpers/window_arrangement_helper.go @@ -86,6 +86,10 @@ type WindowArrangementArgs struct { } func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string, appStatus string) map[string]boxlayout.Dimensions { + return GetWindowDimensions(self.windowArrangementArgs(informationStr, appStatus)) +} + +func (self *WindowArrangementHelper) windowArrangementArgs(informationStr string, appStatus string) WindowArrangementArgs { width, height := self.c.GocuiGui().Size() repoState := self.c.State().GetRepoState() @@ -96,7 +100,7 @@ func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string, searchPrefix = self.c.Tr.SearchPrefix } - args := WindowArrangementArgs{ + return WindowArrangementArgs{ Width: width, Height: height, UserConfig: self.c.UserConfig(), @@ -117,8 +121,6 @@ func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string, SearchPrefix: searchPrefix, SidePanelSizes: self.c.State().GetSidePanelSizes(), } - - return GetWindowDimensions(args) } func shouldUsePortraitMode(args WindowArrangementArgs) bool {