app/window,app/internal/window: allow min/max window size

The app.MinSize and app.MaxSize options restricts the window size:

w := app.NewWindow(
	app.Size(unit.Dp(600), unit.Dp(596)),
	app.MinSize(unit.Dp(600), unit.Dp(596)),
	app.MaxSize(unit.Dp(600), unit.Dp(596)),
	app.Title(APPNAME),
)

Signed-off-by: Jason <sourcehut@sweatyballs.es>
This commit is contained in:
Jason
2020-06-22 12:49:41 +02:00
committed by Elias Naur
parent 20cf570709
commit 9cfbdafe14
7 changed files with 150 additions and 33 deletions
+4 -2
View File
@@ -14,8 +14,10 @@ import (
)
type Options struct {
Width, Height unit.Value
Title string
Width, Height unit.Value
MinWidth, MinHeight unit.Value
MaxWidth, MaxHeight unit.Value
Title string
}
type FrameEvent struct {