Skip to content

Commit

Permalink
Add alias to Gtk::Widget#allocate using integers instead of a `Gdk:…
Browse files Browse the repository at this point in the history
…:Rectangle`.
  • Loading branch information
hugopl committed Jul 25, 2024
1 parent 4bfe2d2 commit d9f6e1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/bindings/gdk/clipboard.cr
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ module Gdk
end
end
end

5 changes: 5 additions & 0 deletions src/bindings/gtk/widget.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module Gtk
GObject::Object.new(ptr, GICrystal::Transfer::None)
end

# :ditto:
def size_allocate(x : Int32, y : Int32, width : Int32, height : Int32, baseline : Int32)
size_allocate(Gdk::Rectangle.new(x, y, width, height), baseline)
end

# Returns an `Iterator` over widget children. Call `.to_a` on it if you need to allocate an
# array with all children.
#
Expand Down

0 comments on commit d9f6e1f

Please sign in to comment.