mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Support for minimum and maximum window sizes (#612)
* add support for minimum and maximum window sizes
* attempt to fix windows
* bug fixes
* support min/max window sizes on Linux and Windows
* fix min/max window sizes on Linux
* formatting and comments
* fixes Windows DPI issue, clamps width/height values to min/max
* App can't go into full screen when max size is set for Mac
* fixed Linux maximum width/height on window maximize
* Revert "fixed Linux maximum width/height on window maximize"
This reverts commit 3f7ba8b264.
The fix glitches on PopOS
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
2b6860b6c3
commit
a1bd1013cb
10 changed files with 299 additions and 5 deletions
|
|
@ -67,6 +67,16 @@ func (r *Window) SetColour(colour string) error {
|
|||
return r.renderer.SetColour(colour)
|
||||
}
|
||||
|
||||
// SetMinSize sets the minimum size of a resizable window
|
||||
func (r *Window) SetMinSize(width, height int) {
|
||||
r.renderer.SetMinSize(width, height)
|
||||
}
|
||||
|
||||
// SetMaxSize sets the maximum size of a resizable window
|
||||
func (r *Window) SetMaxSize(width, height int) {
|
||||
r.renderer.SetMaxSize(width, height)
|
||||
}
|
||||
|
||||
// Fullscreen makes the window fullscreen
|
||||
func (r *Window) Fullscreen() {
|
||||
r.renderer.Fullscreen()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue