I'm using GTK3+ (3.22) on Ubuntu server 18 (beta2) / x11 / openbox. Language is C. I'm porting an embedded application from GTK2 which did not seem to do dynamic resizing of label widgets when the text content reached a certain limit. On GTK3 the label (and button) widgets now seem to resize when the text content is close to the maximum size that can be displayed.
In the case of a button widget placed into a FIXED container on a window. I have tried the following...
The gtk_widget_set_size_request seems only to set a default or minimum, not a max:
gtk_widget_set_size_request( GTK_WIDGET( GuiBottomFarLeftButton ) , GuiBottomButtonWidth , GuiBottomButtonHeight );
I have tried gtk_widget_size_allocate but that doesn't seem to limit the maximum size.
GtkAllocation gtkallocTestSize = { GuiBottomButtonFarLeftX , GuiBottomButtonY , GuiBottomButtonWidth , GuiBottomButtonHeight};
gtk_widget_size_allocate( GTK_WIDGET( GuiBottomFarLeftButton ) , >kallocTestSize );
There does not appear to be a gtk_widget_... function that limits the maximum size or sizing behavior that I can find. So far I have not found a way to limit the maximum size of a specific widget. I would settle for a way to limit the maximum width as the vertical size of the controls seems to behave as it did under GTK2 in the application I'm working on. In most cases the resizing is only effecting the layout by 10 to 20 pixels but this creates a really bad user experience.
Is there a way to disable the resizing on a widget or limit it's maximum size? Or some other work around that actually functions on latest GTK3+ (3.22)?