Author: mir3x
Date: Mon Dec 14 02:35:55 2015
New Revision: 30978

URL: http://svn.gna.org/viewcvs/freeciv?rev=30978&view=rev
Log:
Fixed too small game_info_label in Qt client, causing
strange layout in right bottom corner.
Reported by Marko Lindqvist.

See bug #24007


Modified:
    branches/S2_5/client/gui-qt/mapview.cpp

Modified: branches/S2_5/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/mapview.cpp?rev=30978&r1=30977&r2=30978&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/mapview.cpp     (original)
+++ branches/S2_5/client/gui-qt/mapview.cpp     Mon Dec 14 02:35:55 2015
@@ -293,9 +293,8 @@
                              * gui()->qt_settings.infotab_height) / 100);
     gui()->infotab->move(0 , size.height() - gui()->infotab->height());
     gui()->unitinfo_wdg->move(width() - gui()->unitinfo_wdg->width(), 0);
-    delta = size - gui()->end_turn_rect->sizeHint();
-    gui()->end_turn_rect->resize(gui()->end_turn_rect->sizeHint());
-    gui()->end_turn_rect->move(delta.width(), delta.height());
+    gui()->end_turn_rect->end_turn_update();
+    delta = size - gui()->end_turn_rect->size();
     gui()->game_info_label->move(0, 0);
     gui()->game_info_label->resize(gui()->game_info_label->sizeHint());
     gui()->game_info_label->setMaximumWidth(size.width()
@@ -1086,7 +1085,7 @@
   const struct sprite *sprite;
   int d;
   QSize delta;
-  QFontMetrics fm(this->font());
+  QFontMetrics fm(etb_button->font());
 
   if (client_is_global_observer()) {
     return;
@@ -1114,10 +1113,11 @@
     tax_indicators[d]->setToolTip(_("Shows your current luxury/science/tax "
                                     "rates. Use mouse wheel to change them"));
   }
-
-  setMinimumHeight(fm.height() + 1 + client_research_sprite()->pm->height()
-                   + get_tax_sprite(tileset, O_LUXURY)->pm->height() + 10);
-  delta = gui()->mapview_wdg->size() - gui()->end_turn_rect->sizeHint();
+  setMinimumWidth(get_tax_sprite(tileset, O_LUXURY)->pm->height() + 10 + 25);
+  setMinimumHeight(fm.height() + client_research_sprite()->pm->height()
+                   + get_tax_sprite(tileset, O_LUXURY)->pm->height() + 25);
+  updateGeometry();
+  delta = gui()->mapview_wdg->size() - gui()->end_turn_rect->size();
   move(delta.width(), delta.height());
 }
 


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

Reply via email to