Author: mir3x
Date: Mon Dec 14 02:49:02 2015
New Revision: 30986

URL: http://svn.gna.org/viewcvs/freeciv?rev=30986&view=rev
Log:
In Qt-client chat's widget was used default desktop font. 
Now it will be used font from settings.

See bug #24163


Modified:
    branches/S2_6/client/gui-qt/chatline.cpp
    branches/S2_6/client/gui-qt/chatline.h
    branches/S2_6/client/gui-qt/fc_client.cpp
    branches/S2_6/client/gui-qt/gui_main.cpp

Modified: branches/S2_6/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/chatline.cpp?rev=30986&r1=30985&r2=30986&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/chatline.cpp    (original)
+++ branches/S2_6/client/gui-qt/chatline.cpp    Mon Dec 14 02:49:02 2015
@@ -252,6 +252,18 @@
   return QObject::eventFilter(obj, event);
 }
 
+
+/***************************************************************************
+  Updates font for chatwdg
+***************************************************************************/
+void chatwdg::update_font()
+{
+  QFont *qf;
+  qf = gui()->fc_fonts.get_font("gui_qt_font_chatline");
+  chat_output->setFont(*qf);
+}
+
+
 /***************************************************************************
   Makes link to tile/unit or city
 ***************************************************************************/

Modified: branches/S2_6/client/gui-qt/chatline.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/chatline.h?rev=30986&r1=30985&r2=30986&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/chatline.h      (original)
+++ branches/S2_6/client/gui-qt/chatline.h      Mon Dec 14 02:49:02 2015
@@ -42,6 +42,7 @@
   void append(QString str);
   QLineEdit *chat_line;
   void make_link(struct tile *ptile);
+  void update_font();
 private slots:
   void send();
   void state_changed(int state);

Modified: branches/S2_6/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fc_client.cpp?rev=30986&r1=30985&r2=30986&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/fc_client.cpp   (original)
+++ branches/S2_6/client/gui-qt/fc_client.cpp   Mon Dec 14 02:49:02 2015
@@ -294,6 +294,7 @@
     update_load_page();
     break;
   case PAGE_GAME:
+    gui()->infotab->chtwdg->update_font();
     if (gui_options.gui_qt_fullscreen){
       gui()->showFullScreen();
       gui()->mapview_wdg->showFullScreen();

Modified: branches/S2_6/client/gui-qt/gui_main.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/gui_main.cpp?rev=30986&r1=30985&r2=30986&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/gui_main.cpp    (original)
+++ branches/S2_6/client/gui-qt/gui_main.cpp    Mon Dec 14 02:49:02 2015
@@ -209,6 +209,8 @@
                           apply_help_font);
   option_var_set_callback(gui_qt_font_help_title,
                           apply_help_font);
+  option_var_set_callback(gui_qt_font_chatline,
+                          apply_font);
 #undef option_var_set_callback
 }
 
@@ -333,6 +335,7 @@
     delete remove_old;
     gui()->fc_fonts.set_font(s, f);
     update_city_descriptions();
+    gui()->infotab->chtwdg->update_font();
   }
 }
 


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

Reply via email to