Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#8431) gtk2: city dialog is too small
Home

[Freeciv-Dev] (PR#8431) gtk2: city dialog is too small

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8431) gtk2: city dialog is too small
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 31 Mar 2004 14:41:40 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8431 >

Here is a fix.


Index: client/gui-gtk-2.0/citydlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/citydlg.c,v
retrieving revision 1.78
diff -u -r1.78 citydlg.c
--- client/gui-gtk-2.0/citydlg.c        31 Mar 2004 15:05:29 -0000      1.78
+++ client/gui-gtk-2.0/citydlg.c        31 Mar 2004 22:38:33 -0000
@@ -602,13 +602,19 @@
   /* supported units */
   sw = gtk_scrolled_window_new(NULL, NULL);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
-                                GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+                                GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
   gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
                                      GTK_SHADOW_NONE);
   gtk_container_add(GTK_CONTAINER(pdialog->overview.supported_units_frame), 
sw);
 
-  align = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
-  gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), align);
+  {
+    int unit_height = (is_isometric) ?
+      UNIT_TILE_HEIGHT : UNIT_TILE_HEIGHT + UNIT_TILE_HEIGHT / 2;
+
+    align = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
+    gtk_widget_set_size_request(align, -1, unit_height);
+    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), align);
+  }
 
   table = gtk_table_new(0, 0, FALSE);
   gtk_table_set_col_spacings(GTK_TABLE(table), 2);
@@ -627,12 +633,13 @@
   /* present units */
   sw = gtk_scrolled_window_new(NULL, NULL);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
-                                GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+                                GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
   gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
                                      GTK_SHADOW_NONE);
   gtk_container_add(GTK_CONTAINER(pdialog->overview.present_units_frame), sw);
 
   align = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
+  gtk_widget_set_size_request(align, -1, UNIT_TILE_HEIGHT);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), align);
 
   table = gtk_table_new(0, 0, FALSE);

[Prev in Thread] Current Thread [Next in Thread]