Skip to content

Commit

Permalink
Fix expanding or collapsing mod details while maximized
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Oct 21, 2024
1 parent eb27bf0 commit b539252
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/app/interactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ func (a *app) ExpandMod() bool {
width, height := wailsRuntime.WindowGetSize(common.AppContext)
wailsRuntime.WindowSetMinSize(common.AppContext, utils.ExpandedMin.Width, utils.ExpandedMin.Height)
wailsRuntime.WindowSetMaxSize(common.AppContext, utils.ExpandedMax.Width, utils.ExpandedMax.Height)
wailsRuntime.WindowSetSize(common.AppContext, max(width, settings.Settings.ExpandedSize.Width), height)
if !wailsRuntime.WindowIsMaximised(common.AppContext) {
wailsRuntime.WindowSetSize(common.AppContext, max(width, settings.Settings.ExpandedSize.Width), height)
}
a.IsExpanded = true
return true
}
Expand All @@ -29,7 +31,9 @@ func (a *app) UnexpandMod() bool {
width, height := wailsRuntime.WindowGetSize(common.AppContext)
wailsRuntime.WindowSetMinSize(common.AppContext, utils.UnexpandedMin.Width, utils.UnexpandedMin.Height)
wailsRuntime.WindowSetMaxSize(common.AppContext, utils.UnexpandedMax.Width, utils.UnexpandedMax.Height)
wailsRuntime.WindowSetSize(common.AppContext, min(width, settings.Settings.UnexpandedSize.Width), height)
if !wailsRuntime.WindowIsMaximised(common.AppContext) {
wailsRuntime.WindowSetSize(common.AppContext, min(width, settings.Settings.UnexpandedSize.Width), height)
}
return true
}

Expand Down

0 comments on commit b539252

Please sign in to comment.