Author: mir3x
Date: Sat Oct 15 00:43:17 2016
New Revision: 34133

URL: http://svn.gna.org/viewcvs/freeciv?rev=34133&view=rev
Log:
Qt client - control notify dialog colors from theme

See patch #7826


Modified:
    trunk/client/gui-qt/dialogs.cpp
    trunk/data/themes/gui-qt/Classic/resource.qss
    trunk/data/themes/gui-qt/Necrophos/resource.qss
    trunk/data/themes/gui-qt/NightStalker/resource.qss
    trunk/data/themes/gui-qt/System/resource.qss

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=34133&r1=34132&r2=34133&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Sat Oct 15 00:43:17 2016
@@ -635,10 +635,10 @@
   int x, y;
   QString qlines;
 
+  setAttribute(Qt::WA_DeleteOnClose);
   setCursor(Qt::ArrowCursor);
   setParent(parent);
   setFrameStyle(QFrame::Box);
-  setWindowOpacity(0.5);
   cw = new close_widget(this);
   cw->put_to_corner();
 
@@ -712,9 +712,7 @@
   int i;
 
   pen.setWidth(1);
-  pen.setColor(QColor(232, 255, 0));
-  painter.setBrush(QColor(0, 0, 0, 175));
-  painter.drawRect(0, 0, width(), height());
+  pen.setColor(palette().color(QPalette::Text));
   painter.setFont(small_font);
   painter.setPen(pen);
   painter.drawText(10, fm.height() + 3, qcaption);
@@ -722,10 +720,6 @@
   for (i = 0; i < qlist.count(); i++) {
     painter.drawText(10, 3 + (fm.height() + 3) * (i + 3), qlist[i]);
   }
-  painter.drawLine(0,0,width(),0);
-  painter.drawLine(0,height()-1,width(),height()-1);
-  painter.drawLine(0,0,0,height());
-  painter.drawLine(width()-1,0,width()-1,height());
   cw->put_to_corner();
 }
 

Modified: trunk/data/themes/gui-qt/Classic/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/Classic/resource.qss?rev=34133&r1=34132&r2=34133&view=diff
==============================================================================
--- trunk/data/themes/gui-qt/Classic/resource.qss       (original)
+++ trunk/data/themes/gui-qt/Classic/resource.qss       Sat Oct 15 00:43:17 2016
@@ -604,6 +604,11 @@
   selection-background-color: #c3b48e;
 }
 
+notify_dialog {
+  color: #ffecba;
+  border: 1px solid #ffecba;
+  background-color: rgba(0, 0, 0,175);
+}
 
 unit_item, impr_item {
   selection-background-color: #c3b48e;

Modified: trunk/data/themes/gui-qt/Necrophos/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/Necrophos/resource.qss?rev=34133&r1=34132&r2=34133&view=diff
==============================================================================
--- trunk/data/themes/gui-qt/Necrophos/resource.qss     (original)
+++ trunk/data/themes/gui-qt/Necrophos/resource.qss     Sat Oct 15 00:43:17 2016
@@ -430,6 +430,12 @@
   color: #47a963;
 }
 
+notify_dialog {
+  color: #dcffcf;
+  border: 1px solid #dcffcf;
+  background-color: rgba(0, 0, 0,175);
+}
+
 city_dialog QScrollArea QFrame {
   background: #c5c5c5;
 }

Modified: trunk/data/themes/gui-qt/NightStalker/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/NightStalker/resource.qss?rev=34133&r1=34132&r2=34133&view=diff
==============================================================================
--- trunk/data/themes/gui-qt/NightStalker/resource.qss  (original)
+++ trunk/data/themes/gui-qt/NightStalker/resource.qss  Sat Oct 15 00:43:17 2016
@@ -253,6 +253,13 @@
 
 unit_item, impr_item {
   selection-background-color: #3399FF;
+}
+
+
+notify_dialog {
+  color: white;
+  background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 rgba(0, 0, 
125,135) stop:1 rgba(25, 25, 95, 175));
+  border: 2px solid #0000AA;
 }
 
 QProgressBar {

Modified: trunk/data/themes/gui-qt/System/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/System/resource.qss?rev=34133&r1=34132&r2=34133&view=diff
==============================================================================
--- trunk/data/themes/gui-qt/System/resource.qss        (original)
+++ trunk/data/themes/gui-qt/System/resource.qss        Sat Oct 15 00:43:17 2016
@@ -25,6 +25,11 @@
   color: rgb( 240, 240, 240);
 }
 
+notify_dialog {
+  color: #e8ff00;
+  border: 1px solid #e8ff00;
+  background-color: rgba(0, 0, 0,175);
+}
 
 chatwdg QScrollBar:vertical
 {


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

Reply via email to