[qet] [3174] Add css file style.css

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3174
Author:   scorpio810
Date:     2014-06-23 17:17:35 +0200 (Mon, 23 Jun 2014)
Log Message:
-----------
Add css file style.css

Modified Paths:
--------------
    trunk/qelectrotech.qrc
    trunk/sources/qetapp.cpp

Added Paths:
-----------
    trunk/style.css

Modified: trunk/qelectrotech.qrc
===================================================================
--- trunk/qelectrotech.qrc	2014-06-23 07:35:28 UTC (rev 3173)
+++ trunk/qelectrotech.qrc	2014-06-23 15:17:35 UTC (rev 3174)
@@ -229,5 +229,6 @@
         <file>ico/24x16/nl.png</file>
         <file>ico/32x32/simplifyrichtext.png</file>
         <file>ico/24x16/be.png</file>
+        <file>style.css</file>
     </qresource>
 </RCC>

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2014-06-23 07:35:28 UTC (rev 3173)
+++ trunk/sources/qetapp.cpp	2014-06-23 15:17:35 UTC (rev 3174)
@@ -954,24 +954,12 @@
 			"}"
 		);
 	} else {
-		setStyleSheet(
-					"QTabBar::tab:!selected {background-color: transparent; }"
-					"QMainWindow{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(197, 245, 254)); }"
-					"QListView{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(130, 160, 210)); }"
-					"QTreeView{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(197, 245, 254)); }"
-					"QTreeView::item{background-color: rgba(100, 100, 100, 00);}"
-					"QTreeView::item:hover{background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1); }"
-					"QAbstractScrollArea#mdiarea {"
+		QFile file("style.css");
+		file.open(QFile::ReadOnly);
+		QString styleSheet = QLatin1String(file.readAll());
+		setStyleSheet(styleSheet);
 
-			"	background-color -> setPalette(initial_palette_);"
-			"	background-image: url(':/ico/mdiarea_bg.png');"
-			"	background-repeat: no-repeat;"
-			"	background-position: center middle;"
-			"}"
-		);
 	}
-
-
 }
 
 /**

Added: trunk/style.css
===================================================================
--- trunk/style.css	                        (rev 0)
+++ trunk/style.css	2014-06-23 15:17:35 UTC (rev 3174)
@@ -0,0 +1,21 @@
+QTabBar::tab:!selected
+{background-color: transparent;
+}
+QMainWindow
+{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(197, 245, 254));
+}
+QListView
+{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(130, 160, 210));
+}
+QTreeView
+{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(43, 75, 116), stop:1 rgb(197, 245, 254));
+}
+QTreeView::item
+{background-color: rgba(100, 100, 100, 00);
+}
+QTreeView::item:hover
+{background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);
+}
+QAbstractScrollArea#mdiarea
+{background-image: url(':/ico/mdiarea_bg.png');background-repeat: no-repeat;background-position: center middle;
+}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/