Author: mir3x Date: Sat Oct 15 00:41:18 2016 New Revision: 34130 URL: http://svn.gna.org/viewcvs/freeciv?rev=34130&view=rev Log: Qt client - allow theming sidebar
See patch #7824 Modified: branches/S2_6/client/gui-qt/sidebar.cpp 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/System/resource.qss Modified: branches/S2_6/client/gui-qt/sidebar.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/sidebar.cpp?rev=34130&r1=34129&r2=34130&view=diff ============================================================================== --- branches/S2_6/client/gui-qt/sidebar.cpp (original) +++ branches/S2_6/client/gui-qt/sidebar.cpp Sat Oct 15 00:41:18 2016 @@ -386,7 +386,7 @@ p.drawText(0, height() - 6 , desc); } - p.setPen(QColor(255, 255, 255)); + p.setPen(palette().color(QPalette::Text)); if (custom_label.isEmpty() == false) { sfont->setItalic(false); @@ -396,14 +396,14 @@ } if (current) { - p.setPen(QColor(34, 150, 4)); + p.setPen(palette().color(QPalette::Highlight)); p.drawRect(0 , 0, width() - 1 , height() - 1); } if (hover && !disabled) { p.setCompositionMode(QPainter::CompositionMode_ColorDodge); - p.setPen(QColor(0, 225, 0)); - p.setBrush(QColor(125, 25, 25, 125)); + p.setPen(palette().color(QPalette::Highlight)); + p.setBrush(palette().color(QPalette::AlternateBase)); p.drawRect(0 , 0, width() - 1 , height() - 1); } @@ -417,7 +417,7 @@ if (blink) { p.setCompositionMode(QPainter::CompositionMode_ColorDodge); p.setPen(QColor(0, 0, 0)); - p.setBrush(QColor(85, 25, 25, 185)); + p.setBrush(palette().color(QPalette::HighlightedText)); p.drawRect(0 , 0, width(), height()); } 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=34130&r1=34129&r2=34130&view=diff ============================================================================== --- branches/S2_6/data/themes/gui-qt/Classic/resource.qss (original) +++ branches/S2_6/data/themes/gui-qt/Classic/resource.qss Sat Oct 15 00:41:18 2016 @@ -665,6 +665,7 @@ background: transparent; } + hud_message_box, hud_input_box { background-color: transparent; color: black; @@ -694,3 +695,10 @@ border-radius: 8px; padding: 2px; } + +fc_sidewidget { + color: white; + selection-background-color: rgb(34, 150, 4); + alternate-background-color: rgba(125, 25, 125, 125); + selection-color: rgba(85, 25, 25, 185); +} 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=34130&r1=34129&r2=34130&view=diff ============================================================================== --- branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss (original) +++ branches/S2_6/data/themes/gui-qt/Necrophos/resource.qss Sat Oct 15 00:41:18 2016 @@ -621,3 +621,14 @@ alternate-background-color: rgba(220, 220, 220,220); border: 2px solid black; } + + +fc_sidewidget { + color: white; + /* Box around current widget */ + selection-background-color: rgb(34, 150, 4); + /* Hover effect */ + alternate-background-color: rgba(125, 25, 125, 125); + /* blink */ + selection-color: rgba(85, 25, 25, 185); +} 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=34130&r1=34129&r2=34130&view=diff ============================================================================== --- branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss (original) +++ branches/S2_6/data/themes/gui-qt/NightStalker/resource.qss Sat Oct 15 00:41:18 2016 @@ -620,6 +620,7 @@ border: 2px solid #3399FF; } + hud_input_box { background-color: transparent; color: white; @@ -632,3 +633,15 @@ text: white; background: #2704b2; } + + + +fc_sidewidget { + color: white; + /* Box around current widget */ + selection-background-color: rgb(100, 30, 30); + /* Hover effect */ + alternate-background-color: rgba(75, 0, 75, 125); + /* blink */ + selection-color: rgba(85, 25, 25, 185); +} Modified: branches/S2_6/data/themes/gui-qt/System/resource.qss URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-qt/System/resource.qss?rev=34130&r1=34129&r2=34130&view=diff ============================================================================== --- branches/S2_6/data/themes/gui-qt/System/resource.qss (original) +++ branches/S2_6/data/themes/gui-qt/System/resource.qss Sat Oct 15 00:41:18 2016 @@ -63,3 +63,13 @@ background: #ceced0; selection-background-color: #36c620; } + +fc_sidewidget { + color: white; + /* Box around current widget */ + selection-background-color: rgb(34, 150, 4); + /* Hover effect */ + alternate-background-color: rgba(125, 25, 25, 125); + /* blink */ + selection-color: rgba(85, 25, 25, 185); +} _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits