button: add uiButtonPreferredSize GTK3 implementation
This commit is contained in:
parent
43cf92a277
commit
580b04b41f
|
@ -38,6 +38,13 @@ void uiButtonSetMinSize(uiButton *b, int width, int height)
|
|||
gtk_widget_set_size_request(b->widget, width, height);
|
||||
}
|
||||
|
||||
void uiButtonPreferredSize(uiButton *b, int *width, int *height)
|
||||
{
|
||||
gtk_widget_show(b->widget);
|
||||
gtk_widget_get_preferred_height(b->widget, NULL, height);
|
||||
gtk_widget_get_preferred_width(b->widget, NULL, width);
|
||||
}
|
||||
|
||||
void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)
|
||||
{
|
||||
b->onClicked = f;
|
||||
|
|
Loading…
Reference in New Issue