1/* ALL THE TEMPLATE WIDGETS */
2INHERITS=None
3
4/* ALL THE WIDGETS WITH THE BASE COLOR */
5QMainWindow, QMenu, QDialog, QMessageBox{
6  background: %%BASECOLOR%%;
7  color: %%TEXTCOLOR%%;
8}
9
10/* ALL THE WIDGETS WITH AN ALTERNATE BASE COLOR */
11QLineEdit, QTextEdit, QTextBrowser, QPlainTextEdit, QSpinBox, QDateEdit, QDateTimeEdit, QTimeEdit, QDoubleSpinBox{
12  background: %%ALTBASECOLOR%%;
13  color: %%TEXTCOLOR%%;
14  border-color: %%ACCENTDISABLECOLOR%%;
15  selection-background-color: %%HIGHLIGHTCOLOR%%;
16  selection-color: %%TEXTHIGHLIGHTCOLOR%%;
17
18}
19
20/* PAGES OF CONTAINER WIDGETS */
21QStackedWidget .QWidget, QTabWidget .QWidget{
22  background: %%ALTBASECOLOR%%;
23  color: %%TEXTCOLOR%%;
24  border: none;
25}
26QToolBox::tab{
27  color: %%TEXTCOLOR%%;
28}
29
30/* MENU WIDGETS */
31QMenuBar, QMenuBar::item,QToolBar{
32  background: %%SECONDARYCOLOR%%;
33  border: none;
34  color: %%TEXTCOLOR%%;
35}
36
37QStatusBar{
38  background: QLinearGradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 transparent, stop: 0.5 %%SECONDARYCOLOR%%);
39  border: none;
40  color: %%TEXTCOLOR%%;
41}
42QToolBar:top{
43  border-bottom: 1px solid %%ACCENTCOLOR%%;
44}
45QToolBar:bottom{
46  border-top: 1px solid %%ACCENTCOLOR%%;
47}
48QToolBar:left{
49  border-right: 1px solid %%ACCENTCOLOR%%;
50}
51QToolBar:right{
52  border-left: 1px solid %%ACCENTCOLOR%%;
53}
54
55QMenuBar::item{
56  background: transparent; /*Use the menu bar color*/
57  padding-left: 4px;
58  padding-right: 2px;
59}
60
61QMenuBar::item:selected, QMenuBar::item:pressed, QMenu::item:selected{
62background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%HIGHLIGHTDISABLECOLOR%%, stop: 1 %%HIGHLIGHTCOLOR%%);
63color: %%TEXTHIGHLIGHTCOLOR%%;
64border: 1px solid %%ACCENTCOLOR%%;
65}
66QMenuBar::item:disabled{
67  color: %%TEXTDISABLECOLOR%%;
68}
69
70QMenu::item{
71  border: 2px solid #808080;
72}
73
74QMenu::item{
75  background: transparent;
76  border: 1px solid transparent;
77  color: %%TEXTCOLOR%%;
78  padding: 4px 30px 4px 20px;
79  margin-left: 3px;
80  margin-right: 3px;
81}
82
83/* TAB WIDGETS */
84/*QTabBar{
85  Custom Font settings need to be here and NOT in the ::tab fields,
86      otherwise it will break auto-scaling of the tab sizes to fit the text
87}*/
88QTabBar::tab {
89  background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%SECONDARYDISABLECOLOR%%, stop: 1 %%SECONDARYCOLOR%%);
90  border: 1px solid %%ACCENTCOLOR%%;
91  padding: 2px;
92  color: %%TEXTCOLOR%%;
93}
94QTabBar::tab:top{
95  border-top-left-radius: 4px;
96  border-top-right-radius: 4px;
97  max-width: 100em;
98  min-width: 0em;
99}
100QTabBar::tab:bottom{
101  border-bottom-left-radius: 4px;
102  border-bottom-right-radius: 4px;
103  max-width: 100em;
104  min-width: 0em;
105}
106/* left/right tab indicators appear to be reversed in Qt*/
107QTabBar::tab:right{
108  border-top-left-radius: 4px;
109  border-bottom-left-radius: 4px;
110  max-height: 100em;
111  min-height: 0em;
112}
113QTabBar::tab:left{
114  border-top-right-radius: 4px;
115  border-bottom-right-radius: 4px;
116  max-height: 100em;
117  min-height: 0em;
118}
119QTabBar::tab:selected{
120     background: %%HIGHLIGHTDISABLECOLOR%%;
121}
122QTabBar::tab:hover {
123    background: %%HIGHLIGHTCOLOR%%;
124    border: 1px solid %%ACCENTDISABLECOLOR%%;
125 }
126
127QTabBar::tab:!selected:top {
128    margin-top: 4px;
129}
130QTabBar::tab:!selected:bottom{
131  margin-bottom: 4px;
132}
133QTabBar::tab:!selected:right{
134  margin-left: 4px;
135}
136QTabBar::tab:!selected:left{
137  margin-right: 4px;
138}
139
140/* FRAME WIDGETS */
141QToolTip{
142  background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%BASECOLOR%%, stop: 1 %%ALTBASECOLOR%%);
143  border-radius: 3px;
144  border: 1px solid %%ACCENTCOLOR%%;
145  padding: 1px;
146  color: %%TEXTCOLOR%%;
147}
148
149QLabel{
150  background: transparent;
151  border: none;
152  color: %%TEXTCOLOR%%;
153}
154QAbstractButton::disabled{
155  color: %%TEXTDISABLECOLOR%%;
156}
157
158/* GROUP BOX */
159QGroupBox{
160  background-color: transparent;
161  border-color: %%ACCENTCOLOR%%;
162  border-radius: 5px;
163  margin-top: 2ex;
164  font-weight: bold;
165}
166QGroupBox::title{
167  subcontrol-origin: margin;
168  subcontrol-position: top center;
169  padding: 0 3px;
170  background: transparent;
171  /*border: none;*/
172  color: %%TEXTCOLOR%%;
173}
174
175/* COMBO BOX */
176QComboBox{
177  /*border: 1px solid %%ACCENTCOLOR%%;
178  border-radius: 3px;
179  padding: 1px 18px 1px 3px;*/
180  color: %%TEXTCOLOR%%;
181  background: %%ALTBASECOLOR%%;
182  selection-background-color: %%HIGHLIGHTCOLOR%%;
183 }
184
185
186/* VIEW WIDGETS */
187QTreeView, QListView{
188  background: %%ALTBASECOLOR%%;
189  alternate-background-color: %%BASECOLOR%%;
190  /*selection-background-color: %%SECONDARYCOLOR%%;*/
191  border: 1px solid %%ACCENTCOLOR%%;
192  border-radius: 3px;
193  /*show-decoration-selected: 1;*/
194  color: %%TEXTCOLOR%%;
195  selection-color: %%TEXTCOLOR%%;
196}
197
198QTreeView:focus, QListView:focus{
199  border: 1px solid %%HIGHLIGHTDISABLECOLOR%%;
200}
201
202/*
203QTreeView::item and QListView::item unneccessary:
204Already set though parentage  and causes usage errors if set manually
205*/
206
207/*QTreeView::item:selected, QListView::item:selected{
208  background: %%SECONDARYDISABLECOLOR%%;
209  border-color: %%ACCENTCOLOR%%;
210  color: %%TEXTCOLOR%%;
211}*/
212
213QTreeView::item:hover, QListView::item:hover{
214  background: %%HIGHLIGHTDISABLECOLOR%%;
215}
216QTreeView::item:selected:hover, QListView::item:selected:hover{
217  background: %%HIGHLIGHTDISABLECOLOR%%;
218}
219QTreeView::item:selected, QListView::item:selected{
220  background: %%SECONDARYDISABLECOLOR%%;
221}
222QTreeView::item:selected:focus, QListView::item:selected:focus{
223  background: %%SECONDARYCOLOR%%;
224}
225QHeaderView{
226  background: %%HIGHLIGHTDISABLECOLOR%%;
227  color: %%TEXTHIGHLIGHTCOLOR%%;
228  border: none;
229  border-top-left-radius: 3px; /*match the list/tree view widgets*/
230  border-top-right-radius: 3px;  /*match the list/tree view widgets*/
231}
232QHeaderView::section{
233  background: %%HIGHLIGHTDISABLECOLOR%%; /*QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%PRIMARYDISABLECOLOR%%, stop: 1 %%PRIMARYCOLOR%%);*/
234  color: %%TEXTHIGHLIGHTCOLOR%%;
235  border-color: %%ACCENTCOLOR%%;
236  padding: 1px;
237  padding-left: 4px;
238}
239QHeaderView::section:hover{
240  background: %%PRIMARYCOLOR%%;
241  border-color: %%ACCENTDISABLECOLOR%%;
242  color: %%TEXTCOLOR%%;
243}
244
245/* SCROLLBARS (NOTE: Changing 1 subcontrol means you have to change all of them)*/
246QScrollBar{
247  background: QLinearGradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %%SECONDARYCOLOR%%, stop: 1 %%SECONDARYDISABLECOLOR%%);
248  /*border: 1px solid %%ACCENTCOLOR%%;*/
249}
250QScrollBar:horizontal{
251  margin: 0px 20px 0px 20px;
252}
253QScrollBar:vertical{
254  margin: 20px 0px 20px 0px;
255}
256QScrollBar::sub-page, QScrollBar::add-page{
257  background: %%BASECOLOR%%;
258  border: 1px solid %%ACCENTCOLOR%%;
259}
260QScrollBar::sub-page:vertical{
261  border-bottom: none;
262}
263QScrollBar::add-page:vertical{
264  border-top: none;
265}
266QScrollBar::sub-page:horizontal{
267  border-right: none;
268}
269QScrollBar::add-page:horizontal{
270  border-left: none;
271}
272QScrollBar::handle{
273  background: QLinearGradient(x1: 0, y1: -0.3, x2: 0, y2: 1.3, stop: 0 %%BASECOLOR%%, stop: 0.5 %%SECONDARYCOLOR%%, stop: 1 %%BASECOLOR%%);
274  border: 1px solid %%ACCENTCOLOR%%;
275}
276QScrollBar::handle:hover, QScrollBar::add-line:hover, QScrollBar::sub-line:hover{
277  background: %%HIGHLIGHTCOLOR%%;
278}
279QScrollBar::add-line{
280  background: QLinearGradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %%SECONDARYDISABLECOLOR%%, stop: 1 %%SECONDARYCOLOR%%);
281  border: 1px solid %%ACCENTCOLOR%%;
282  border-radius: 3px;
283subcontrol-position: bottom right;
284subcontrol-origin: margin;
285}
286QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical{
287height: 20px;
288}
289QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal{
290width: 20px;
291}
292QScrollBar::sub-line{
293  background: QLinearGradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %%SECONDARYCOLOR%%, stop: 1 %%SECONDARYDISABLECOLOR%%);
294  border: 1px solid %%ACCENTCOLOR%%;
295  border-radius: 3px;
296subcontrol-position: top left;
297subcontrol-origin: margin;
298height: 20px;
299}
300/* SLIDERS */
301QSlider::groove:horizontal {
302border: 1px solid %%ACCENTCOLOR%%;
303background: %%ALTBASECOLOR%%;
304height: 10px;
305border-radius: 3px;
306}
307QSlider::groove:vertical {
308border: 1px solid %%ACCENTCOLOR%%;
309background: %%ALTBASECOLOR%%;
310width: 10px;
311border-radius: 3px;
312}
313QSlider::sub-page:horizontal {
314background: qlineargradient(x1: 0, y1: 0,  x2: 1, y2: 1,
315    stop: 0 %%HIGHLIGHTCOLOR%%, stop: 1 %%HIGHLIGHTDISABLECOLOR%%);
316border: 1px solid %%ACCENTCOLOR%%;
317height: 10px;
318border-radius: 3px;
319}
320QSlider::sub-page:vertical {
321background: qlineargradient(x1: 0, y1: 0,  x2: 1, y2: 1,
322    stop: 0 %%HIGHLIGHTCOLOR%%, stop: 1 %%HIGHLIGHTDISABLECOLOR%%);
323border: 1px solid %%ACCENTCOLOR%%;
324width: 10px;
325border-radius: 3px;
326}
327QSlider::add-page:horizontal{
328background: %%ALTBASECOLOR%%;
329border: 1px solid %%ACCENTCOLOR%%;
330height: 10px;
331border-radius: 3px;
332}
333QSlider::add-page:vertical{
334background: %%ALTBASECOLOR%%;
335border: 1px solid %%ACCENTCOLOR%%;
336width: 10px;
337border-radius: 3px;
338}
339QSlider::handle:horizontal{
340background: %%ALTBASECOLOR%%;
341border: 1px solid %%ACCENTCOLOR%%;
342width: 13px;
343border-radius: 4px;
344}
345QSlider::handle:vertical{
346background: %%ALTBASECOLOR%%;
347border: 1px solid %%ACCENTCOLOR%%;
348height: 13px;
349border-radius: 4px;
350}
351QSlider::handle:horizontal:hover, QSlider::handle:vertical:hover{
352border: 1px solid %%ACCENTDISABLECOLOR%%;
353/*background: %%HIGHLIGHTCOLOR%%;*/
354}
355
356QSlider::sub-page:horizontal:disabled {
357background: %%ACCENTDISABLECOLOR%%;
358border-color: %%ACCENTCOLOR%%;
359}
360
361QSlider::add-page:horizontal:disabled {
362background: %%ACCENTDISABLECOLOR%%;
363border-color: %%ACCENTCOLOR%%;
364}
365
366QSlider::handle:horizontal:disabled {
367background: %%ALTBASECOLOR%%;
368border: 1px solid %%ACCENTCOLOR%%;
369}
370
371/* BUTTONS */
372QPushButton{
373     border: 1px solid %%ACCENTCOLOR%%;
374     border-radius: 3px;
375     background-color: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%SECONDARYDISABLECOLOR%%, stop: 1 %%SECONDARYCOLOR%%);
376     padding: 2px;
377     padding-right: 4px;
378  color: %%TEXTCOLOR%%;
379 }
380
381QToolButton{ /* Assume a flat button for every toolbutton by default*/
382  color: %%TEXTCOLOR%%;
383  border: 1px solid transparent;
384  border-radius: 3px;
385  background-color: transparent;
386  padding: 1px;
387}
388
389 QPushButton:pressed, QPushButton:open, QPushButton:selected, QPushButton:checked, QPushButton:on, QToolButton:pressed, QToolButton:open, QToolButton:selected, QToolButton:checked, QToolButton:on{
390     background-color: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%HIGHLIGHTDISABLECOLOR%%, stop: 1 %%HIGHLIGHTCOLOR%%);
391	 margin-top: 2px;
392 }
393
394QPushButton:flat, QToolButton:flat{
395   background-color: transparent;
396   border: 1px solid transparent; /* no border for a flat button */
397}
398
399QPushButton:hover, QToolButton:hover{
400   border: 1px solid %%ACCENTCOLOR%%;
401   background-color: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%HIGHLIGHTDISABLECOLOR%%, stop: 1 %%HIGHLIGHTCOLOR%%);
402   color: %%TEXTHIGHLIGHTCOLOR%%;
403}
404QRadioButton, QCheckBox{
405   padding: 2px;
406   border: 1px solid transparent;
407   border-radius: 3px;
408   color: %%TEXTCOLOR%%;
409}
410QRadioButton::hover, QCheckBox:hover{
411   background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%HIGHLIGHTDISABLECOLOR%%, stop: 1 %%HIGHLIGHTCOLOR%%);
412   border: 1px solid %%ACCENTCOLOR%%;
413   color: %%TEXTHIGHLIGHTCOLOR%%;
414}
415QRadioButton::indicator, QCheckBox::indicator, QGroupBox::indicator{
416  border: 1px solid %%TEXTCOLOR%%;
417}
418QRadioButton::indicator{
419  border-radius: 7px;
420}
421QRadioButton::indicator:checked{
422  background: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:1, fx:0.5, fy:0.5, stop:0 %%TEXTCOLOR%%, stop:0.25 %%TEXTCOLOR%%, stop:0.25001 transparent);
423}
424QCheckBox::indicator:checked, QGroupBox::indicator:checked{
425  padding: 1px;
426  background-origin: content;
427  background-clip: content;
428  background: %%TEXTCOLOR%%;
429}
430QCheckBox::indicator:indeterminate, QGroupBox::indicator:indeterminate{
431  padding: 1px;
432  background-origin: content;
433  background-clip: content;
434  background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0.49 transparent, stop: 0.5 %%TEXTCOLOR%%);
435}
436
437/* PROGRESSBAR */
438QProgressBar{
439     background-color: %%ALTBASECOLOR%%;
440     border: 1px solid %%ACCENTCOLOR%%;
441     border-radius: 5px;
442     color: %%TEXTCOLOR%%;
443     text-align: center;
444     padding: 1px;
445}
446 QProgressBar::chunk {
447     background-color: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 %%HIGHLIGHTCOLOR%%, stop: 1 %%HIGHLIGHTDISABLECOLOR%%);
448     /*border: 1px solid %%ACCENTDISABLECOLOR%%;*/
449     border-radius: 5px;
450 }
451QProgressBar::chunk:vertical{
452 margin-left: 2px;
453 margin-right: 2px;
454}
455QProgressBar::chunk:horizontal{
456 margin-top: 2px;
457 margin-bottom: 2px;
458}
459
460 /* SPINBOX */
461/*QAbstractSpinBox{
462  background-color: %%ALTBASECOLOR%%;
463  border: 1px solid %%ACCENTCOLOR%%;
464  border-radius: 3px;
465}
466QAbstractSpinBox:disabled{
467  color: %%ACCENTDISABLECOLOR%%;
468}*/
469/*QAbstractSpinBox::down-button{
470  subcontrol-origin: border;
471  subcontrol-position: left;
472  width: 16px;
473  border-width: 1px;
474}
475QAbstractSpinBox::up-button{
476  subcontrol-origin: border;
477  subcontrol-position: right;
478  width: 16px;
479  border-width: 1px;
480}*/
481/*
482QAbstractSpinBox::down-arrow{
483  border-image: url(":/trolltech/styles/commonstyle/images/left-16.png");
484  width: 16px;
485  height: 16px;
486}
487QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::down-arrow:off, QAbstractSpinBox::up-arrow:off{
488  border-image: url(:/none);
489}
490QAbstractSpinBox::up-arrow{
491  border-image: url(":/trolltech/styles/commonstyle/images/right-16.png");
492  width: 16px;
493  height: 16px;
494}*/
495