Author: cazfi
Date: Sat Dec 20 04:38:23 2014
New Revision: 27354

URL: http://svn.gna.org/viewcvs/freeciv?rev=27354&view=rev
Log:
Set minimum height for gtk3-client citydlg present and supported unit lists
even if they are empty.

Reported by Jacob Nevins <jtn>

See bug #20772

Modified:
    branches/S2_5/client/gui-gtk-3.0/citydlg.c

Modified: branches/S2_5/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/citydlg.c?rev=27354&r1=27353&r2=27354&view=diff
==============================================================================
--- branches/S2_5/client/gui-gtk-3.0/citydlg.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/citydlg.c  Sat Dec 20 04:38:23 2014
@@ -783,7 +783,7 @@
   GtkListStore *production_store;
   /* TRANS: Overview tab in city dialog */
   const char *tab_title = _("_Overview");
-  int unit_height = tileset_tile_height(tileset) * 3 / 2;
+  int unit_height = tileset_unit_height(tileset);
 
   /* main page */
   page = gtk_grid_new();
@@ -937,8 +937,6 @@
   /* supported units */
   sw = gtk_scrolled_window_new(NULL, NULL);
   gtk_widget_set_hexpand(sw, TRUE);
-  gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw),
-                                             unit_height);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
                                  GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
   gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
@@ -949,6 +947,7 @@
 
   table = gtk_grid_new();
   gtk_grid_set_column_spacing(GTK_GRID(table), 2);
+  gtk_widget_set_size_request(table, -1, unit_height);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), table);
 
   gtk_container_set_focus_hadjustment(GTK_CONTAINER(table),
@@ -962,8 +961,6 @@
   /* present units */
   sw = gtk_scrolled_window_new(NULL, NULL);
   gtk_widget_set_hexpand(sw, TRUE);
-  gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(sw),
-                                             unit_height);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
                                  GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
   gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
@@ -972,6 +969,7 @@
 
   table = gtk_grid_new();
   gtk_grid_set_column_spacing(GTK_GRID(table), 2);
+  gtk_widget_set_size_request(table, -1, unit_height);
   gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), table);
 
   gtk_container_set_focus_hadjustment(GTK_CONTAINER(table),


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to