Author: mir3x
Date: Thu Oct 20 09:57:17 2016
New Revision: 34188

URL: http://svn.gna.org/viewcvs/freeciv?rev=34188&view=rev
Log:
Qt client - move resize and close pixmap out of code and let them be controlled 
by theme

See patch #7850

Added:
    branches/S2_6/data/themes/gui-qt/icons/close.png   (with props)
    branches/S2_6/data/themes/gui-qt/icons/resize.png   (with props)
Modified:
    branches/S2_6/client/gui-qt/mapview.cpp
    branches/S2_6/client/gui-qt/mapview.h
    branches/S2_6/data/themes/gui-qt/Classic/resource.qss
    branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss
    branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss
    branches/S2_6/data/themes/gui-qt/icons/Makefile.am

Modified: branches/S2_6/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/mapview.cpp?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/mapview.cpp     (original)
+++ branches/S2_6/client/gui-qt/mapview.cpp     Thu Oct 20 09:57:17 2016
@@ -411,7 +411,7 @@
 {
   setParent(parent);
   setCursor(Qt::SizeFDiagCursor);
-  setPixmap(QPixmap(resize_button));
+  setPixmap(*fc_icons::instance()->get_pixmap("resize"));
 }
 
 /****************************************************************************
@@ -458,7 +458,7 @@
 {
   setParent(parent);
   setCursor(Qt::ArrowCursor);
-  setPixmap(QPixmap(close_button));
+  setPixmap(*fc_icons::instance()->get_pixmap("close"));
 }
 
 /****************************************************************************

Modified: branches/S2_6/client/gui-qt/mapview.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/mapview.h?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/mapview.h       (original)
+++ branches/S2_6/client/gui-qt/mapview.h       Thu Oct 20 09:57:17 2016
@@ -43,47 +43,6 @@
 class QPixmap;
 
 class minimap_view;
-/* pixmap of resize button */
-const char *const resize_button[] = {
- "13 13 3 1",
- "  c none",
- ". c #f8ff81",
- "x c #000000",
- "xxxxxxxxxxxx ",
- "x..........x ",
- "x.xxx......x ",
- "x.xx.......x ",
- "x.x.x......x ",
- "x....x.....x ",
- "x.....x....x ",
- "x.....x....x ",
- "x......x.x.x ",
- "x.......xx.x ",
- "x......xxx.x ",
- "x..........x ",
- "xxxxxxxxxxxx "
-};
-
-/* pixmap of close button */
-const char *const close_button[] = {
- "13 13 3 1",
- "  c none",
- ". c #f8ff81",
- "x c #000000",
- "xxxxxxxxxxxx ",
- "x..........x ",
- "x.x......x.x ",
- "x..x....x..x ",
- "x...x..x...x ",
- "x....xx....x ",
- "x....xx....x ",
- "x...x..x...x ",
- "x..x....x..x ",
- "x.x......x.x ",
- "x..........x ",
- "xxxxxxxxxxxx ",
- "             "
-};
 
 bool is_point_in_area(int x, int y, int px, int py, int pxe, int pye);
 void draw_calculated_trade_routes(QPainter *painter);

Modified: branches/S2_6/data/themes/gui-qt/Classic/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/Classic/resource.qss?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/data/themes/gui-qt/Classic/resource.qss       (original)
+++ branches/S2_6/data/themes/gui-qt/Classic/resource.qss       Thu Oct 20 
09:57:17 2016
@@ -24,6 +24,16 @@
   color: #000000;
   background-color: #e7d6b0;
   border: 2px solid #c3b48e;
+}
+
+close_widget 
+{
+  background: #ddca97;
+}
+
+resize_widget
+{
+  background: #ddca97;
 }
 
 QPushButton {

Modified: branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss     (original)
+++ branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss     Thu Oct 20 
09:57:17 2016
@@ -37,6 +37,16 @@
   border: 2px solid black;
 }
 
+close_widget 
+{
+  background: #006633;
+}
+
+resize_widget
+{
+  background: #006633;
+}
+
 QPushButton {
   color: black;
   background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fefefe 
,stop: 1 #eaeaea);

Modified: branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss  (original)
+++ branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss  Thu Oct 20 
09:57:17 2016
@@ -53,6 +53,16 @@
 *[city_scroll="true"] {
   border: none;
   border-radius: none;
+}
+
+close_widget 
+{
+  background: #1155BB;
+}
+
+resize_widget
+{
+  background: #1155BB;
 }
 
 QPushButton {

Modified: branches/S2_6/data/themes/gui-qt/icons/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/icons/Makefile.am?rev=34188&r1=34187&r2=34188&view=diff
==============================================================================
--- branches/S2_6/data/themes/gui-qt/icons/Makefile.am  (original)
+++ branches/S2_6/data/themes/gui-qt/icons/Makefile.am  Thu Oct 20 09:57:17 2016
@@ -7,6 +7,7 @@
        ai.png                  \
        building.png            \
        cities.png              \
+       close.png               \
        cunits.png              \
        economy.png             \
        endturn.png             \
@@ -21,6 +22,7 @@
        meeting-observer.png    \
        preferences-other.png   \
        research.png            \
+       resize.png              \
        units.png               \
        wonder.png              \
        view.png

Added: branches/S2_6/data/themes/gui-qt/icons/close.png
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/icons/close.png?rev=34188&view=auto
==============================================================================
Binary file - no diff available.

Propchange: branches/S2_6/data/themes/gui-qt/icons/close.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: branches/S2_6/data/themes/gui-qt/icons/resize.png
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/icons/resize.png?rev=34188&view=auto
==============================================================================
Binary file - no diff available.

Propchange: branches/S2_6/data/themes/gui-qt/icons/resize.png
------------------------------------------------------------------------------
    svn:mime-type = image/png


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

Reply via email to