Skip to content

SetMaxSize undoes the effect of SetResiazble [Linux] #9

@gysddn

Description

@gysddn

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
		})
	})

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions