@@ -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