Style fixes by nemo
authorunc0rr
Sun, 15 Mar 2009 14:36:14 +0000 (2009-03-15)
changeset 1893 85c61bc5e160
parent 1892 fddc1201df25
child 1894 ba54441631da
Style fixes by nemo
QTfrontend/main.cpp
QTfrontend/pages.cpp
--- a/QTfrontend/main.cpp	Sun Mar 15 12:59:52 2009 +0000
+++ b/QTfrontend/main.cpp	Sun Mar 15 14:36:14 2009 +0000
@@ -62,175 +62,142 @@
 				"background-color: #870c8f;"
 				"}"
 
-			"QPushButton{"
+			"QPushButton, QLineEdit, QLabel, QHeaderView, "
+			"QListWidget, QTableView, QTextBrowser, QSpinBox, "
+			"QToolBox::tab, QToolBox::tab QWidget, QComboBox, "
+			"QComboBox QAbstractItemView, IconedGroupBox, .QGroupBox, "
+            "GameCFGWidget, TeamSelWidget, SelWeaponWidget, "
+			"QCheckBox, QRadioButton, QMenu::item, QTabBar::tab:selected {"
+				"color: #ffcc00;"
+			"}"
+
+			"QLineEdit, QListWidget, QTableView, QTextBrowser, QSpinBox, QComboBox, "
+            "QComboBox QAbstractItemView, QMenu::item {"
+				"background-color: #0d0544;"
+			"}"
+
+			"QPushButton, QListWidget, QTableView, QLineEdit, QHeaderView, "
+			"QTextBrowser, QSpinBox, QToolBox, QComboBox, "
+            "QComboBox QAbstractItemView, IconedGroupBox, "
+			".QGroupBox, GameCFGWidget, TeamSelWidget, SelWeaponWidget, QTabWidget::pane {"
 				"border: solid;"
 				"border-width: 3px;"
+				"border-color: #ffcc00;"
+			"}"
+
+			"QPushButton:hover, QLineEdit:hover, QListWidget:hover, "
+			"QSpinBox:hover, QToolBox:hover, QComboBox:hover {"
+			    "border-color: yellow;"
+			"}"
+
+			"QLineEdit, QListWidget,QTableView, QTextBrowser, "
+			"QSpinBox, QToolBox { "
+				"border-radius: 12px;"
+			"}"
+
+			"QLineEdit, QLabel, QHeaderView, QListWidget, QTableView, "
+			"QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView, "
+			"IconedGroupBox, .QGroupBox, GameCFGWidget, TeamSelWidget, "
+            "SelWeaponWidget, QCheckBox, QRadioButton {"
+				"font: bold 14px;"
+			"}"
+
+			".QGroupBox,GameCFGWidget,TeamSelWidget,SelWeaponWidget {"
+				"background-image: url(\":/res/panelbg.png\");"
+				"background-position: bottom center;"
+				"background-repeat: repeat-x;"
+				"border-radius: 16px;"
+				"background-color: #040200;"
+				"padding: 6px;"
+			"}"
+
+			"IconedGroupBox, QTabWidget::pane, QTabBar::tab:selected, QToolBox::tab QWidget{"
+				"background-color: #130f2c;"
+			"}"
+
+
+			"QPushButton {"
 				"border-radius: 10px;"
-				"border-color: #ffcc00;"
 				"background-origin: margin;"
 				"background-position: top left;"
 				"background-color: #00351d;"
-				"color: #ffcc00;"
-				"}"
-				"QPushButton:hover{"
-				"border-color: yellow;"
-				"}"
-				"QPushButton:pressed{"
-				"border-color: white;"
-				"}"
+			"}"
+
+			"QPushButton:pressed{"
+			    "border-color: white;"
+			"}"
 
-			"QLineEdit{"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 12px;"
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
-			"QLineEdit:hover{"
-				"border-color: yellow;"
-				"}"
-
-			"QLabel{"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
+			"QHeaderView {"
+				"border-radius: 0;"
+				"border-width: 0;"
+				"border-bottom-width: 3px;"
+				"background-color: #00351d;"
+			"}"
 
-			"QListWidget,QTableView{"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 12px;"
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-//				"alternate-background-color: #2f213a;" //what's it?
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
-			"QListWidget:hover{"
-				"border-color: yellow;"
-				"}"
-
-			"QTextBrowser{"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 12px;"
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-				"color: #ffcc00;"
-//				"font: bold 14px;"
-				"}"
-
-			"QSpinBox{"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 12px;"
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
-			"QSpinBox:hover{"
-				"border-color: yellow;"
-				"}"
+            "QTabBar::tab {"
+                 "border-top: solid;"
+                 "border-left: solid;"
+                 "border-right: solid;"
+                 "border-width: 3px;"
+                 "border-radius: 0;"
+                 "border-top-left-radius: 6px;"
+                 "border-top-right-radius: 6px;"
+                 "border-color: #ffcc00;"
+                 "padding: 3px;"
+            "}"
+            "QTabBar::tab:!selected {"
+                 "color: #0d0544;"
+                 "background-color: #ffcc00;"
+            "}"
 			"QSpinBox::up-button{"
 				"background: transparent;"
 				"width: 16px;"
 				"height: 10px;"
-				"}"
-			"QSpinBox::up-arrow{"
+			"}"
+
+			"QSpinBox::up-arrow {"
 				"image: url(\":/res/spin_up.png\");"
-				//"width: 5px;"
-				//"height: 5px;"
-				"}"
-			"QSpinBox::down-button{"
+			"}"
+
+			"QSpinBox::down-arrow {"
+				"image: url(\":/res/spin_down.png\");"
+			"}"
+
+			"QSpinBox::down-button {"
 				"background: transparent;"
 				"width: 16px;"
 				"height: 10px;"
-				"}"
-			"QSpinBox::down-arrow{"
-				"image: url(\":/res/spin_down.png\");"
-				"}"
-
-			"QToolBox{"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 12px;"
-				"border-color: #ffcc00;"
-				//"background-color: #0d0544;"
 			"}"
-			"QToolBox::tab{"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
-			"QToolBox:hover{"
-				"border-color: yellow;"
-				"}"
 
-			"QComboBox{"
-				"border: solid;"
-				"border-width: 3px;"
+			"QComboBox {"
 				"border-radius: 15px;"
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
 				"padding: 3px;"
-//				"text-align: center;"
-				"}"
-			"QComboBox:hover{"
-				"border-color: yellow;"
-				"}"
+			"}"
 			"QComboBox:pressed{"
 				"border-color: white;"
-				"}"
+			"}"
 			"QComboBox::drop-down{"
 				"border: transparent;"
 				"width: 25px;"
-				"}"
+			"}"
 			"QComboBox::down-arrow {"
 				"image: url(\":/res/dropdown.png\");"
-				"}"
-			"QComboBox QAbstractItemView{"
+			"}"
+			"QComboBox QAbstractItemView {"
 				"border: solid transparent;"
-				"border-width: 3px;"
-				//"border-radius: 12px;" -- bad corners look
-				"border-color: #ffcc00;"
-				"background-color: #0d0544;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
+			"}"
 			
-			"VertScrArea{"
+			"VertScrArea {"
 				"background-image: url(\":/res/panelbg.png\");"
 				"background-position: bottom center;"
 				"background-repeat: repeat-x;"
-				"}"
+			"}"
 			
-			"IconedGroupBox{"
-				"border: solid;"
-				"border-width: 3px;"
+			"IconedGroupBox {"
 				"border-radius: 16px;"
-				"border-color: #ffcc00;"
-				"background-color: #130f2c;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
 				"padding: 2px;"
-				"}"
-			".QGroupBox,GameCFGWidget,TeamSelWidget,SelWeaponWidget{"
-				"background-image: url(\":/res/panelbg.png\");"
-				"background-position: bottom center;"
-				"background-repeat: repeat-x;"
-				"border: solid;"
-				"border-width: 3px;"
-				"border-radius: 16px;"
-				"border-color: #ffcc00;"
-				"background-color: #040200;"
-				"padding: 6px;"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				//"margin-top: 24px;"
-				"}"
+			"}"
+
 			".QGroupBox::title{"
 				"subcontrol-origin: margin;"
 				"subcontrol-position: top left;"
@@ -239,10 +206,6 @@
 				"text-align: left;"
 				"}"
 
-			"QCheckBox{"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
 			"QCheckBox::indicator:checked{"
 				"image: url(\":/res/checked.png\");"
 				"}"
@@ -250,52 +213,45 @@
 				"image: url(\":/res/unchecked.png\");"
 				"}"
 			
-			"QRadioButton{"
-				"color: #ffcc00;"
-				"font: bold 14px;"
-				"}"
-			
 			".QWidget{"
 				"background: transparent;"
 				"}"
-			".QTabWidget{"
-				//"background: transparent;"
-				"background-color: #130f2c;"
-				"}"
+
+			"QTabWidget::pane {"
+                "border-top-width: 2px;"
+			"}"
 
 			"QMenu{"
 				"background-color: #ffcc00;"
 				"margin: 3px;"
-				"}"
-			"QMenu::item{"
+			"}"
+			"QMenu::item {"
 				"background-color: #0d0544;"
 				"border: 1px solid transparent;"
 				"font: bold;"
-				"color: #ffcc00;"
 				"padding: 2px 25px 2px 20px;"
-				"}"
-			"QMenu::item:selected{"
-				"border-color: yellow;"
+			"}"
+			"QMenu::item:selected {"
 				"background-color: #2d2564;"
-				"}"
-			"QMenu::indicator{"
+			"}"
+			"QMenu::indicator {"
 				"width: 16px;"
 				"height: 16px;"
-				"}"
+			"}"
 			"QMenu::indicator:non-exclusive:checked{"
 				"image: url(\":/res/checked.png\");"
-				"}"
+			"}"
 			"QMenu::indicator:non-exclusive:unchecked{"
 				"image: url(\":/res/unchecked.png\");"
-				"}"
+			"}"
 
 			"QToolTip{"
 				"background-color: #0d0544;"
-				"}"
+			"}"
 			
 			":disabled{"
 				"color: #a0a0a0;"
-				"}"
+			"}"
 			)
 		);
 
--- a/QTfrontend/pages.cpp	Sun Mar 15 12:59:52 2009 +0000
+++ b/QTfrontend/pages.cpp	Sun Mar 15 14:36:14 2009 +0000
@@ -760,7 +760,6 @@
 	roomsList->setSelectionBehavior(QAbstractItemView::SelectRows);
 	roomsList->verticalHeader()->setVisible(false);
 	roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
-	roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
 	pageLayout->addWidget(roomsList, 1, 0, 3, 1);
 	pageLayout->setRowStretch(2, 100);
 	
@@ -795,6 +794,11 @@
 			QTableWidget::tr("Players number") <<
 			QTableWidget::tr("Round in progress")
 			);
+
+   roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
+   roomsList->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents);
+   roomsList->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents);
+
 	
 	if (list.size() % 3)
 		return;