diff options
author | jstebbins <[email protected]> | 2014-05-15 16:39:08 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-05-15 16:39:08 +0000 |
commit | c2ec2ce8b0f1a79a2204f608f06e7309f2306c0e (patch) | |
tree | 1475d960266d6287d9234dcc668994d68c7cad48 /gtk/src | |
parent | 0eeac2d4a98ff021c61bce7c45e4b0b9fc479efd (diff) |
LinGui: work around bonehead Gtk developer decision
The width of radio buttons in GtkStackSwitcher are hard coded to 100.
Parse the container to get the buttons and fix this idiocy.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6194 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c index e324f2063..e180b1986 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -1208,6 +1208,23 @@ main(int argc, char *argv[]) gtk_widget_override_font(GTK_WIDGET(textview), font_desc); pango_font_description_free(font_desc); + // Grrrr! Gtk developers !!!hard coded!!! the width of the + // radio buttons in GtkStackSwitcher to 100!!! + // + // Thankfully, GtkStackSwitcher is a regular container object + // and we can access the buttons to change their width. + GList *stack_switcher_children, *link; + GtkContainer * stack_switcher = GTK_CONTAINER( + GHB_WIDGET(ud->builder, "SettingsStackSwitcher")); + link = stack_switcher_children = gtk_container_get_children(stack_switcher); + while (link != NULL) + { + GtkWidget *widget = link->data; + gtk_widget_set_size_request(widget, -1, -1); + link = link->next; + } + g_list_free(stack_switcher_children); + // Everything should be go-to-go. Lets rock! gtk_main(); |