[Freeciv-Dev] (PR#10845) science report usability
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10845 >
> [chrisk - Tue Nov 02 15:41:19 2004]:
>
> CVS 02 NOV 2004 S2 GTK2
>
> In the science tab, when choosing the science target, the possible target
> aren't enrolled fully, even when they fit perfectly in the menue box.
>
> See attached PNGs.
This seems to be a "feature" of GTK+ option menu. I have however noticed
that the tech name in the goal option button isn't left aligned on
window resizing, so this patch fixes that.
? client/gui-gtk-2.0/.repodlgs.c.swp
Index: client/gui-gtk-2.0/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v
retrieving revision 1.63
diff -u -u -r1.63 repodlgs.c
--- client/gui-gtk-2.0/repodlgs.c 1 Nov 2004 21:58:48 -0000 1.63
+++ client/gui-gtk-2.0/repodlgs.c 2 Nov 2004 18:00:08 -0000
@@ -197,41 +197,43 @@
gtk_box_pack_start(GTK_BOX(science_dialog_shell->vbox),
frame, FALSE, FALSE, 0);
- hbox = gtk_hbox_new( TRUE, 5 );
+ hbox = gtk_hbox_new(TRUE, 4);
gtk_container_add(GTK_CONTAINER(frame), hbox);
science_change_menu_button = gtk_option_menu_new();
- gtk_box_pack_start( GTK_BOX( hbox ), science_change_menu_button,TRUE, TRUE,
0 );
+ gtk_box_pack_start(GTK_BOX(hbox), science_change_menu_button,
+ TRUE, TRUE, 0);
popupmenu = gtk_menu_new();
gtk_widget_show_all(popupmenu);
science_current_label=gtk_progress_bar_new();
- gtk_box_pack_start( GTK_BOX( hbox ), science_current_label,TRUE, FALSE, 0 );
+ gtk_box_pack_start(GTK_BOX(hbox), science_current_label, TRUE, TRUE, 0);
gtk_widget_set_size_request(science_current_label, -1, 25);
science_help_toggle = gtk_check_button_new_with_label (_("Help"));
- gtk_box_pack_start( GTK_BOX( hbox ), science_help_toggle, TRUE, FALSE, 0 );
+ gtk_box_pack_start(GTK_BOX(hbox), science_help_toggle, TRUE, FALSE, 0);
frame = gtk_frame_new( _("Goal"));
gtk_box_pack_start(GTK_BOX(science_dialog_shell->vbox),
frame, FALSE, FALSE, 0);
- hbox = gtk_hbox_new( TRUE, 5 );
+ hbox = gtk_hbox_new(TRUE, 4);
gtk_container_add(GTK_CONTAINER(frame),hbox);
science_goal_menu_button = gtk_option_menu_new();
- gtk_box_pack_start(GTK_BOX(hbox), science_goal_menu_button, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), science_goal_menu_button,
+ TRUE, TRUE, 0);
goalmenu = gtk_menu_new();
gtk_widget_show_all(goalmenu);
science_goal_label = gtk_label_new("");
- gtk_box_pack_start( GTK_BOX( hbox ), science_goal_label, TRUE, FALSE, 0 );
+ gtk_box_pack_start(GTK_BOX(hbox), science_goal_label, TRUE, TRUE, 0);
gtk_widget_set_size_request(science_goal_label, -1, 25);
w = gtk_label_new("");
- gtk_box_pack_start( GTK_BOX( hbox ), w,TRUE, FALSE, 0 );
+ gtk_box_pack_start(GTK_BOX(hbox), w, TRUE, FALSE, 0);
hbox = gtk_hbox_new(TRUE, 0);
gtk_box_pack_start(GTK_BOX(science_dialog_shell->vbox),
@@ -551,7 +553,7 @@
label = gtk_label_new(advances[tech].name);
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
gtk_size_group_add_widget(group1, label);
my_snprintf(text, sizeof(text), "%d",
@@ -559,7 +561,7 @@
label = gtk_label_new(text);
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_size_group_add_widget(group2, label);
gtk_menu_shell_append(GTK_MENU_SHELL(goalmenu), item);
|
|