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

Setting v/h- expand to true #65

Closed
yakir12 opened this issue Mar 19, 2024 · 1 comment · Fixed by #66
Closed

Setting v/h- expand to true #65

yakir12 opened this issue Mar 19, 2024 · 1 comment · Fixed by #66

Comments

@yakir12
Copy link
Contributor

yakir12 commented Mar 19, 2024

There is a discussion about setting the vexpand and hexpand properties of canvas to true since there is some expectation that the canvas would expand with its parent window (see https://discourse.julialang.org/t/allow-for-auto-scaling-of-image-in-gtk4/111624/2).

I assume that that can be easily achieved with adding ; hexpand = true, vexpand = true to:

canvas(::Type{U}=DeviceUnit, w::Integer=-1, h::Integer=-1; init_back=false, modifier_ref=nothing) where {U<:CairoUnit} = Canvas{U}(w, h; init_back=init_back, modifier_ref=modifier_ref)
canvas(w::Integer, h::Integer; init_back=false, modifier_ref=nothing) = canvas(DeviceUnit, w, h; init_back=init_back, modifier_ref=modifier_ref)

Or we could simply document that somewhere....

I'm open to PR either option.

@jwahlstrand
Copy link
Collaborator

I agree this should be the default -- there's a PR in #66

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

Successfully merging a pull request may close this issue.

2 participants