@@ -19,7 +19,9 @@ func (a *app) ExpandMod() bool {
19
19
width , height := wailsRuntime .WindowGetSize (common .AppContext )
20
20
wailsRuntime .WindowSetMinSize (common .AppContext , utils .ExpandedMin .Width , utils .ExpandedMin .Height )
21
21
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
+ }
23
25
a .IsExpanded = true
24
26
return true
25
27
}
@@ -29,7 +31,9 @@ func (a *app) UnexpandMod() bool {
29
31
width , height := wailsRuntime .WindowGetSize (common .AppContext )
30
32
wailsRuntime .WindowSetMinSize (common .AppContext , utils .UnexpandedMin .Width , utils .UnexpandedMin .Height )
31
33
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
+ }
33
37
return true
34
38
}
35
39
0 commit comments