mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[windows] Do not allow maximise via runtime if disableResize is true
This commit is contained in:
@@ -201,7 +201,9 @@ func (f *Frontend) WindowHide() {
|
||||
func (f *Frontend) WindowMaximise() {
|
||||
runtime.LockOSThread()
|
||||
if f.hasStarted {
|
||||
f.mainWindow.Maximise()
|
||||
if !f.frontendOptions.DisableResize {
|
||||
f.mainWindow.Maximise()
|
||||
}
|
||||
} else {
|
||||
f.frontendOptions.WindowStartState = options.Maximised
|
||||
}
|
||||
@@ -519,7 +521,10 @@ func (f *Frontend) navigationCompleted(sender *edge.ICoreWebView2, args *edge.IC
|
||||
|
||||
switch f.frontendOptions.WindowStartState {
|
||||
case options.Maximised:
|
||||
f.mainWindow.Maximise()
|
||||
if !f.frontendOptions.DisableResize {
|
||||
f.mainWindow.Maximise()
|
||||
}
|
||||
f.mainWindow.Show()
|
||||
case options.Minimised:
|
||||
f.mainWindow.Minimise()
|
||||
case options.Fullscreen:
|
||||
|
||||
Reference in New Issue
Block a user