Skip to content

Commit

Permalink
set vexpand/hexpand to true in constructor
Browse files Browse the repository at this point in the history
This is what the default was in GTK3, I think.
  • Loading branch information
jwahlstrand committed Mar 19, 2024
1 parent b18ac4d commit 06d56ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GtkObservables"
uuid = "8710efd8-4ad6-11eb-33ea-2d5ceb25a41c"
version = "2.0.5"
version = "2.0.6"

[deps]
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
Expand Down
3 changes: 3 additions & 0 deletions src/graphics_interaction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ struct Canvas{U}

function Canvas{U}(w::Int=-1, h::Int=-1; own::Bool=true, init_back=false, modifier_ref=nothing) where U
gtkcanvas = GtkCanvas(w, h, init_back)
# let canvas grow to fill available space
Gtk4.hexpand(gtkcanvas,true)
Gtk4.vexpand(gtkcanvas,true)
# Initialize handlers
mouse = MouseHandler{U}(gtkcanvas, modifier_ref)
grab_focus(gtkcanvas)
Expand Down

0 comments on commit 06d56ac

Please sign in to comment.