Skip to content

Commit b539252

Browse files
committed
Fix expanding or collapsing mod details while maximized
1 parent eb27bf0 commit b539252

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backend/app/interactions.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ func (a *app) ExpandMod() bool {
1919
width, height := wailsRuntime.WindowGetSize(common.AppContext)
2020
wailsRuntime.WindowSetMinSize(common.AppContext, utils.ExpandedMin.Width, utils.ExpandedMin.Height)
2121
wailsRuntime.WindowSetMaxSize(common.AppContext, utils.ExpandedMax.Width, utils.ExpandedMax.Height)
22-
wailsRuntime.WindowSetSize(common.AppContext, max(width, settings.Settings.ExpandedSize.Width), height)
22+
if !wailsRuntime.WindowIsMaximised(common.AppContext) {
23+
wailsRuntime.WindowSetSize(common.AppContext, max(width, settings.Settings.ExpandedSize.Width), height)
24+
}
2325
a.IsExpanded = true
2426
return true
2527
}
@@ -29,7 +31,9 @@ func (a *app) UnexpandMod() bool {
2931
width, height := wailsRuntime.WindowGetSize(common.AppContext)
3032
wailsRuntime.WindowSetMinSize(common.AppContext, utils.UnexpandedMin.Width, utils.UnexpandedMin.Height)
3133
wailsRuntime.WindowSetMaxSize(common.AppContext, utils.UnexpandedMax.Width, utils.UnexpandedMax.Height)
32-
wailsRuntime.WindowSetSize(common.AppContext, min(width, settings.Settings.UnexpandedSize.Width), height)
34+
if !wailsRuntime.WindowIsMaximised(common.AppContext) {
35+
wailsRuntime.WindowSetSize(common.AppContext, min(width, settings.Settings.UnexpandedSize.Width), height)
36+
}
3337
return true
3438
}
3539

0 commit comments

Comments
 (0)