mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
fix disable window resize (#2863)
* fix disable window resize * change issue number in changelog * change pull request number in changelog
This commit is contained in:
@@ -110,7 +110,7 @@ func NewWindow(appoptions *options.App, debug bool, devtools bool) *Window {
|
||||
// Setup window
|
||||
result.SetKeepAbove(appoptions.AlwaysOnTop)
|
||||
result.SetResizable(!appoptions.DisableResize)
|
||||
result.SetSize(appoptions.Width, appoptions.Height)
|
||||
result.SetDefaultSize(appoptions.Width, appoptions.Height)
|
||||
result.SetDecorated(!appoptions.Frameless)
|
||||
result.SetTitle(appoptions.Title)
|
||||
result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight)
|
||||
@@ -315,6 +315,10 @@ func (w *Window) SetResizable(resizable bool) {
|
||||
C.gtk_window_set_resizable(w.asGTKWindow(), gtkBool(resizable))
|
||||
}
|
||||
|
||||
func (w *Window) SetDefaultSize(width int, height int) {
|
||||
C.gtk_window_set_default_size(w.asGTKWindow(), C.int(width), C.int(height))
|
||||
}
|
||||
|
||||
func (w *Window) SetSize(width int, height int) {
|
||||
C.gtk_window_resize(w.asGTKWindow(), C.gint(width), C.gint(height))
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fix issue where app would exit before main() on linux if $DISPLAY env var was not set. Fixed by @phildrip in [PR](https://github.com/wailsapp/wails/pull/2841)
|
||||
- Fixed a race condition when positioning the window on Linux. Added by @lyimmi in [PR](https://github.com/wailsapp/wails/pull/2850)
|
||||
- Fixed `SetBackgroundColour` so it sets the window's background color to reduce resize flickering on Linux. Added by @lyimmi in [PR](https://github.com/wailsapp/wails/pull/2853)
|
||||
|
||||
- Fixed disable window resize option and wrong initial window size when its enabled. Added by @lyimmi in [PR](https://github.com/wailsapp/wails/pull/2863)
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
Reference in New Issue
Block a user