Various minor frontend CSS tweaks
authorWuzzy <Wuzzy2@mail.ru>
Sat, 17 Mar 2018 00:13:49 +0100
changeset 13231 6193503c4727
parent 13230 d5a029299407
child 13232 2a3c52c49e8e
Various minor frontend CSS tweaks - Static border color for stats, teams list, map draw widget - Explicit definition of table header - New splitter design which works with the Qt style “Windows”
QTfrontend/hedgewars.qrc
QTfrontend/res/css/qt.css
QTfrontend/res/sort_down.png
QTfrontend/res/sort_up.png
QTfrontend/res/splitter.png
QTfrontend/ui/page/pagegamestats.cpp
--- a/QTfrontend/hedgewars.qrc	Fri Mar 16 19:25:51 2018 +0100
+++ b/QTfrontend/hedgewars.qrc	Sat Mar 17 00:13:49 2018 +0100
@@ -119,6 +119,8 @@
         <file>res/spin_up_disabled.png</file>
         <file>res/spin_down.png</file>
         <file>res/spin_down_disabled.png</file>
+        <file>res/sort_up.png</file>
+        <file>res/sort_down.png</file>
         <file>res/PlaySound.png</file>
         <file>res/hh_small.png</file>
         <file>res/btnDisabled.png</file>
@@ -187,6 +189,7 @@
         <file>res/lock_disabled.png</file>
         <file>res/unlock.png</file>
         <file>res/unlock_disabled.png</file>
+        <file>res/splitter.png</file>
         <file>res/StatsMedal1.png</file>
         <file>res/StatsMedal2.png</file>
         <file>res/StatsMedal3.png</file>
--- a/QTfrontend/res/css/qt.css	Fri Mar 16 19:25:51 2018 +0100
+++ b/QTfrontend/res/css/qt.css	Sat Mar 17 00:13:49 2018 +0100
@@ -32,16 +32,36 @@
 
 a { color:#c8c8ff; }
 
-QLineEdit, QListWidget, QListView, QTableView, QTextBrowser, QSpinBox, QComboBox,
+QLineEdit, QListWidget, QListView, QTableView, QTableWidget, QTextBrowser, QSpinBox, QComboBox,
 QComboBox QAbstractItemView, QPlainTextEdit, QMenu::item, #labelLikeLineEdit {
 background-color: rgba(13, 5, 68, 70%);
 }
 
+VertScrArea, QGraphicsView {
+border-style: solid; border-width: 2px; border-color: #cca300; border-radius: 3px;
+}
+#gameStatsView {
+border-color: #332816;
+}
+
+QSplitter::handle {
+background-image: url(":/res/splitter.png");
+background-clip: content;
+}
+QSplitter::handle:horizontal {
+width: 7px;
+background-repeat: repeat-y;
+}
+QSplitter::handle:vertical {
+height: 7px;
+background-repeat: repeat-x;
+}
+
 QComboBox::separator {
 border: solid; border-width: 3px; border-color: #ffcc00;
 }
 
-QPushButton, QListWidget, QListView, QTableView, QLineEdit, QHeaderView,
+QPushButton, QListWidget, QListView, QTableView, QTableWidget, QLineEdit,
 QTextBrowser, QSpinBox, QToolBox, QComboBox, QPlainTextEdit,
 QComboBox QAbstractItemView, IconedGroupBox,
 .QGroupBox, #gameStackContainer, TeamSelWidget, SelWeaponWidget,
@@ -81,7 +101,7 @@
 background-color: #100744;
 }
 
-QLineEdit, QListWidget, QListView, QTableView, QTextBrowser,
+QLineEdit, QListWidget, QListView, QTableView, QTableWidget, QTextBrowser,
 QSpinBox, QToolBox, QPlainTextEdit, QToolButton, #mapPreview, #labelLikeLineEdit {
 border-radius: 10px;
 }
@@ -96,7 +116,7 @@
 }
 
 QLineEdit, QLabel, QHeaderView, QListWidget, QListView, QTableView,
-QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView,
+QTableWidget, QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView,
 IconedGroupBox, .QGroupBox, #gameStackContainer, TeamSelWidget,
 SelWeaponWidget, QCheckBox, QRadioButton, QPushButton, QPlainTextEdit {
 font: bold 13px;
@@ -149,12 +169,35 @@
 }
 
 QHeaderView {
-border-radius: 0;
-border-width: 0;
+background-color: #00351d;
+border: solid;
 border-bottom-width: 3px;
-background-color: #00351d;
+border-top-width: 0px;
+border-left-width: 0px;
+border-right-width: 0px;
+border-color: #ffcc00;
 }
-QTableView {
+QHeaderView::section {
+border-left-width: 1px;
+border-right-width: 1px;
+border-top-width: 0;
+border-bottom-width: 0px;
+border-color: #001d10;
+border-style: solid;
+background-color: #00351d;
+padding: 4px;
+}
+QHeaderView::section:pressed {
+background-color: #00250d;
+}
+QHeaderView::up-arrow {
+image: url(":/res/sort_up.png");
+}
+QHeaderView::down-arrow{
+image: url(":/res/sort_down.png");
+}
+
+QTableView, QTableWidget {
 alternate-background-color: #2f213a;
 gridline-color: transparent;
 }
Binary file QTfrontend/res/sort_down.png has changed
Binary file QTfrontend/res/sort_up.png has changed
Binary file QTfrontend/res/splitter.png has changed
--- a/QTfrontend/ui/page/pagegamestats.cpp	Fri Mar 16 19:25:51 2018 +0100
+++ b/QTfrontend/ui/page/pagegamestats.cpp	Sat Mar 17 00:13:49 2018 +0100
@@ -70,6 +70,7 @@
 
     // graph
     graphic = new FitGraphicsView(gb);
+    graphic->setObjectName("gameStatsView");
     labelGraphTitle = new QLabel(this);
     labelGraphTitle->setTextFormat(Qt::RichText);
     labelGraphTitle->setText("<br><h1><img src=\":/res/StatsH.png\"> " + PageGameStats::tr("Health graph") + "</h1>");