-
-
Notifications
You must be signed in to change notification settings - Fork 82
Issue #862 - Add size_allocate vfunc to gtk::Widget #959
Conversation
Uh sorry I forgot a change by mistake. It's now in. |
Is not better add it against master branch and then mass cherry-pick it on next minor release ? |
Yes, please update this to the master branch. Everything should first go to master :) |
@@ -209,6 +210,10 @@ pub trait WidgetImpl: WidgetImplExt + ObjectImpl + 'static { | |||
fn get_preferred_height_for_width(&self, widget: &Widget, width: i32) -> (i32, i32) { | |||
self.parent_get_preferred_height_for_width(widget, width) | |||
} | |||
|
|||
fn size_allocate(&self, widget: &Widget, allocation: &mut Allocation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a mutable reference? In GTK it's all const. AFAIU this gives the allocation to the subclass, not returns the allocation from the subclass.
Also the gtk_widget_size_allocate()
function should probably be exposed at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is exposed as gtk::WidgetExt::size_allocate
. or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a mutable reference? In GTK it's all const. AFAIU this gives the allocation to the subclass, not returns the allocation from the subclass.
See PR #961
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
Replaced by PR #961 |
(patch is against 0.8 but should go into master too)