Author: mir3x
Date: Sun Feb 12 20:08:22 2017
New Revision: 35017

URL: http://svn.gna.org/viewcvs/freeciv?rev=35017&view=rev
Log:
Qt client - contrast colors in diplomacy dialog overriden by theme

See gna bug #25495


Modified:
    trunk/client/gui-qt/diplodlg.cpp

Modified: trunk/client/gui-qt/diplodlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/diplodlg.cpp?rev=35017&r1=35016&r2=35017&view=diff
==============================================================================
--- trunk/client/gui-qt/diplodlg.cpp    (original)
+++ trunk/client/gui-qt/diplodlg.cpp    Sun Feb 12 20:08:22 2017
@@ -105,10 +105,9 @@
          + "</center></h3></b>";
   colr = get_player_color(tileset, player_by_number(initiated_from));
   text = "<style>h3{background-color: "
-         + colr->qcolor.name() + ";}</style>" + text;
-  palette.setColor(QPalette::WindowText, color_best_contrast(colr,
-                   textcolors, ARRAY_SIZE(textcolors))->qcolor);
-  label3->setPalette(palette);
+         + colr->qcolor.name() + ";" + "color: " + color_best_contrast(colr,
+             textcolors, ARRAY_SIZE(textcolors))->qcolor.name()
+         + "}</style>" + text;
   label3->setText(text);
   label3->setMinimumWidth(300);
   label4 = new QLabel;
@@ -117,10 +116,9 @@
          + "</center></h3></b></body>";
   colr = get_player_color(tileset, player_by_number(counterpart));
   text = "<style>h3{background-color: "
-         + colr->qcolor.name() + ";}</style>" + text;
-  palette.setColor(QPalette::WindowText, color_best_contrast(colr,
-                   textcolors, ARRAY_SIZE(textcolors))->qcolor);
-  label4->setPalette(palette);
+         + colr->qcolor.name() + ";" + "color: " + color_best_contrast(colr,
+             textcolors, ARRAY_SIZE(textcolors))->qcolor.name()
+         + "}</style>" + text;
   label4->setMinimumWidth(300);
   label4->setText(text);
   layout->addWidget(label3, 0, 5);


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

Reply via email to