button: implement uiButtonSetMinSize for GTK3

This commit is contained in:
Rustam Gamidov 2020-03-24 21:37:49 +02:00
parent 388887aaa6
commit ecdf31eb5e
1 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,11 @@ void uiButtonSetText(uiButton *b, const char *text)
gtk_button_set_label(b->button, text); gtk_button_set_label(b->button, text);
} }
void uiButtonSetMinSize(uiButton *b, int width, int height)
{
gtk_widget_set_size_request(b->widget, width, height);
}
void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data) void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *, void *), void *data)
{ {
b->onClicked = f; b->onClicked = f;