Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetMaxSize undoes the effect of SetResiazble [Linux] #9

Open
gysddn opened this issue Sep 24, 2024 · 0 comments
Open

SetMaxSize undoes the effect of SetResiazble [Linux] #9

gysddn opened this issue Sep 24, 2024 · 0 comments

Comments

@gysddn
Copy link
Contributor

gysddn commented Sep 24, 2024

When called after SetResizable, SetMaxSize completely undoes the effect of SetResizable on Linux.

Test case:

package main

import (
	"tractor.dev/toolkit-go/desktop"
	"tractor.dev/toolkit-go/desktop/app"
	"tractor.dev/toolkit-go/desktop/window"
)

func main() {
	desktop.Start(func() {
		app.Run(app.Options{}, func() {
			w := window.New(window.Options{
				URL:   "https://google.com",
				Title: "Hello",
				Size: desktop.Size{
					Width:  800,
					Height: 800,
				},
				Visible:     true,
				Resizable:   true,
				Center:      true,
				Transparent: true,
			})
			w.Reload()
			w.SetTitle("Test")
			w.SetMinSize(desktop.Size{
				Width: 400,
				Height: 400,
			})
			w.SetResizable(false)
			w.SetMaxSize(desktop.Size{
				Width: 1000,
				Height: 1000,
			})
			// ---> Still resizable here
		})
	})

}
@gysddn gysddn changed the title SetMaxSize undoes the effect of SetResiazble SetMaxSize undoes the effect of SetResiazble [Linux] Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant