Author: mir3x Date: Thu Oct 20 09:57:42 2016 New Revision: 34189 URL: http://svn.gna.org/viewcvs/freeciv?rev=34189&view=rev Log: Qt client - move resize and close pixmap out of code and let them be controlled by theme
See patch #7850 Added: trunk/data/themes/gui-qt/icons/close.png (with props) trunk/data/themes/gui-qt/icons/resize.png (with props) Modified: trunk/client/gui-qt/mapview.cpp trunk/client/gui-qt/mapview.h 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/icons/Makefile.am Modified: trunk/client/gui-qt/mapview.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/client/gui-qt/mapview.cpp (original) +++ trunk/client/gui-qt/mapview.cpp Thu Oct 20 09:57:42 2016 @@ -412,7 +412,7 @@ { setParent(parent); setCursor(Qt::SizeFDiagCursor); - setPixmap(QPixmap(resize_button)); + setPixmap(*fc_icons::instance()->get_pixmap("resize")); } /**************************************************************************** @@ -459,7 +459,7 @@ { setParent(parent); setCursor(Qt::ArrowCursor); - setPixmap(QPixmap(close_button)); + setPixmap(*fc_icons::instance()->get_pixmap("close")); } /**************************************************************************** Modified: trunk/client/gui-qt/mapview.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.h?rev=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/client/gui-qt/mapview.h (original) +++ trunk/client/gui-qt/mapview.h Thu Oct 20 09:57:42 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: trunk/data/themes/gui-qt/Classic/resource.qss URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/Classic/resource.qss?rev=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/data/themes/gui-qt/Classic/resource.qss (original) +++ trunk/data/themes/gui-qt/Classic/resource.qss Thu Oct 20 09:57:42 2016 @@ -24,6 +24,16 @@ color: #000000; background-color: #e7d6b0; border: 2px solid #c3b48e; +} + +close_widget +{ + background: #ddca97; +} + +resize_widget +{ + background: #ddca97; } QPushButton { 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=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/data/themes/gui-qt/Necrophos/resource.qss (original) +++ trunk/data/themes/gui-qt/Necrophos/resource.qss Thu Oct 20 09:57:42 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: trunk/data/themes/gui-qt/NightStalker/resource.qss URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/NightStalker/resource.qss?rev=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/data/themes/gui-qt/NightStalker/resource.qss (original) +++ trunk/data/themes/gui-qt/NightStalker/resource.qss Thu Oct 20 09:57:42 2016 @@ -53,6 +53,16 @@ *[city_scroll="true"] { border: none; border-radius: none; +} + +close_widget +{ + background: #1155BB; +} + +resize_widget +{ + background: #1155BB; } QPushButton { Modified: trunk/data/themes/gui-qt/icons/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/icons/Makefile.am?rev=34189&r1=34188&r2=34189&view=diff ============================================================================== --- trunk/data/themes/gui-qt/icons/Makefile.am (original) +++ trunk/data/themes/gui-qt/icons/Makefile.am Thu Oct 20 09:57:42 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: trunk/data/themes/gui-qt/icons/close.png URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/icons/close.png?rev=34189&view=auto ============================================================================== Binary file - no diff available. Propchange: trunk/data/themes/gui-qt/icons/close.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: trunk/data/themes/gui-qt/icons/resize.png URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-qt/icons/resize.png?rev=34189&view=auto ============================================================================== Binary file - no diff available. Propchange: trunk/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