mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-22 22:01:06 -06:00
GTK: hook SetMinSize. fuck around with gtk_widget_set_size_request() so the window can be resized smaller than the initial size.
This commit is contained in:
@ -85,6 +85,11 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||
{ \
|
||||
gtk_widget_grab_focus(type(c)->widget); \
|
||||
}
|
||||
#define uiUnixControlDefaultSetMinSize(type) \
|
||||
static void type ## SetMinSize(uiControl *c, int w, int h) \
|
||||
{ \
|
||||
gtk_widget_set_size_request(type(c)->widget, w, h); \
|
||||
}
|
||||
// TODO this whole addedBefore stuff is a MASSIVE HACK.
|
||||
#define uiUnixControlDefaultSetContainer(type) \
|
||||
static void type ## SetContainer(uiUnixControl *c, GtkContainer *container, gboolean remove) \
|
||||
@ -112,6 +117,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||
uiUnixControlDefaultEnable(type) \
|
||||
uiUnixControlDefaultDisable(type) \
|
||||
uiUnixControlDefaultSetFocus(type) \
|
||||
uiUnixControlDefaultSetMinSize(type) \
|
||||
uiUnixControlDefaultSetContainer(type)
|
||||
|
||||
#define uiUnixControlAllDefaults(type) \
|
||||
@ -133,6 +139,7 @@ _UI_EXTERN void uiUnixControlSetContainer(uiUnixControl *, GtkContainer *, gbool
|
||||
uiControl(var)->Enable = type ## Enable; \
|
||||
uiControl(var)->Disable = type ## Disable; \
|
||||
uiControl(var)->SetFocus = type ## SetFocus; \
|
||||
uiControl(var)->SetMinSize = type ## SetMinSize; \
|
||||
uiUnixControl(var)->SetContainer = type ## SetContainer;
|
||||
// TODO document
|
||||
_UI_EXTERN uiUnixControl *uiUnixAllocControl(size_t n, uint32_t typesig, const char *typenamestr);
|
||||
|
Reference in New Issue
Block a user