about summary refs log blame commit diff
path: root/users/tazjin/gruber-darker.qss
blob: 16f4c2f329917c1396eef054508b8b72f754b750 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508



























































































































































































































































































































































































































































































































                                                                                                                                             
/**
** Gruber Darker theme for Quassel.
**
** This theme derives from multiple different things:
**
** - Quassel DarkSolarized (https://gist.github.com/Zren/e91ad5197f9d6b6d410f)
** - Quassel Dracula (https://github.com/dracula/quassel)
** - gruber-darker for Emacs (https://github.com/rexim/gruber-darker-theme)
** - Original Gruber theme for BBEdit (https://daringfireball.net/projects/bbcolors/schemes/)
**
** This is a work-in-progress as I haven't figured out the point of
** all of the colours yet, and what I want them to be instead.
**
**/

/**
** Helpful Links:
**  - QT:
**      http://qt-project.org/doc/qt-4.8/stylesheet-syntax.html
**      http://doc.qt.nokia.com/4.7-snapshot/stylesheet-reference.html
**      http://doc.qt.nokia.com/4.7-snapshot/stylesheet-examples.html
**  - Plastique Client Style:
**      https://qt.gitorious.org/qt/qt/source/src/gui/styles/qplastiquestyle.cpp
**      https://github.com/mirror/qt/blob/4.8/src/gui/styles/qplastiquestyle.cpp
**  - Quassel Stylesheet Gallery:
**      http://bugs.quassel-irc.org/projects/1/wiki/Stylesheet_Gallery
**      http://bugs.quassel-irc.org/projects/1/wiki/Stylesheet_Gallery#DarkMonokaiqss
*/

/**
**  - QSS Notes:
**      Quassel stylesheets also support Palette { role: color; } for setting the system
**      palette. See the QPalette docs for available roles, and convert them into qss-style
**      attributes, so ButtonText would become button-text or see qssparser.cpp In fact,
**      qssparser.cpp is the authorative source for Quassel's qss syntax that contains all
**      the extensions over standard Qt qss syntax.
**      See:
**          http://qt-project.org/doc/qt-4.8/qpalette.html#ColorRole-enum
**          https://github.com/quassel/quassel/blob/master/src/uisupport/qssparser.cpp
**
*/

Palette {
    /* Window colors */
    window: #282828;
    background: #181818;
    foreground: #f4f4f4;

    base: #181818;
    alternate-base: #282828;

    /* Just setting palette(tooltip-base) doesn't work as intended so we set it in
    ** a QTooltip{} rule as well.
    */
    tooltip-base: #282a36; // palette(base) TODO
    tooltip-text: white; // palette(text) TODO

    /* The following attributes should be done in a scale */
    light: #444444; // Tab Borders, Scrollbar handle grips, Titled Panel border (Settings)
    midlight: #333333; // ?
    button: #292929; // Menu BG, Scrollbar and Button base.
    mid: #252525; // Titled Panel border (Settings)
    dark: #202020; // TreeView [-] and ... color (Also various borders in Windows Client Style)
    shadow: #1d1d1d; // ?


    /* Text colors */
    text: white;
    button-text: #f8f8f2;

    highlight: #44475a;

    /* Link colors */
    link: #ff79c6;
    link-visited: #bd93f9;

    /* Color of the marker line in the chat view. BG Node that is overlayed on the first new ChatLine. */
    // 0 -> 0.1 (sharp line)
    marker-line: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #586e75, stop: 0.1 #586e75, stop: 0.1 transparent);
}

/*
** Base Object Colors
*/

/* Tables */
// QTreeView#settingsTree -> Tree in the Settings popup.

QTreeView, QTableView {
    alternate-background-color: #282a36;
    // background-color: palette(shadow);
    border: 0px;
}

QTreeView {
  selection-background-color: transparent;
}

QTreeView::item {
  border-left: 2px solid palette(base);
}

QTreeView::item:focus {
  border-width: 0 0 0 2px;
  outline: none;
}

QTreeView::item:selected {
  border-width: 0 0 0 2px;
  color: palette(button-text);
}

QTreeView::item:hover {
  background: palette(dark);
}


QTreeView::item:selected:active{
  color: palette(button-text);
  background: palette(dark);
  border-color: palette(highlight);
}

QTreeView::item:selected:!active {
  color: palette(button-text);
  background: palette(dark);
  border-color: palette(highlight);
}

/* Scrollbar */
/* From Quassel Wiki: http://sprunge.us/iZGB */
QScrollBar {
    //background: transparent;
    background: palette(base);
    margin: 0;
}
QScrollBar:hover {
    /* Optional: Subtle accent of scrolling area on hover */
    background: #161616; /* base +2 */
}
QScrollBar:vertical {
    width: 8px;
}
QScrollBar:horizontal {
    height: 8px;
}

QScrollBar::handle {
    padding: 0;
    margin: 2px;
    border-radius: 2px;
    border: 2px solid palette(midlight);
    background: palette(midlight);
}

QScrollBar::handle:vertical {
    min-height: 20px;
    min-width: 0px;
}

QScrollBar::handle:horizontal {
    min-width: 20px;
    min-height: 0px;
}
QScrollBar::handle:hover {
    border-color: palette(light);
    background: palette(light);
}
QScrollBar::handle:pressed {
    background: palette(highlight);
    border-color: palette(highlight);
}

QScrollBar::add-line , QScrollBar::sub-line {
    height: 0px;
    border: 0px;
}
QScrollBar::up-arrow, QScrollBar::down-arrow {
    border: 0px;
    width: 0px;
    height: 0px;
}

QScrollBar::add-page, QScrollBar::sub-page {
    background: none;
}

/* Input Box */
MultiLineEdit {
    //background: palette(base);
    //color: palette(foreground);
}

/* Widgets */
/* http://doc.qt.nokia.com/4.7-snapshot/qdockwidget.html */
//QMainWindow,
QMainWindow QAbstractScrollArea {
    //border: 0; // Remove borders.
    border: 1px solid palette(shadow);
}

QMainWindow {
    //background: palette(mid); // Main window trim
}

/* Splitter */
/* The splits between QDockWidgets and QMainWindow is a different element. */
QSplitter::handle,
QMainWindow::separator {
	background: palette(dark);
}
QSplitter::handle:horizontal:hover,
QMainWindow::separator:vertical:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 palette(window), stop: 0.5 palette(light), stop: 1 palette(window));
}

QSplitter::handle:vertical:hover,
QMainWindow::separator:horizontal:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 palette(window), stop: 0.5 palette(light), stop: 1 palette(window));
}

/* Menu Bar / Context Menues */
QMenu {
    margin: 5px; // A bit of nice padding around menu items.
}

/* ToolTip */
/* Note: You cannot create transparent sections in the popup box without a mask set. Thus the black edges outside the rounded borders. */
QToolTip {
    border: 2px solid #202020; // palette(dark)
    border-radius: 2px;
    background: #282a36; // palette(base)
    color: white; // palette(text)
}

/* Tabs */
/*
    The palette is designed for the selected one to be darker. So we need to change it. Decided to do a simple line.
    tab:bottom and tab:top reverse y1 and y2 on the linear gradients.

    Tab Shadow: #444444 (light)
    Tab Hover: #666
    Tab Selected: palette(highlight)
*/

QTabWidget::tab-bar {
    alignment: center;
}

QTabBar::tab {
    min-width: 30px;
    height: 20px;
}

QTabBar::tab:bottom:selected {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 palette(highlight), stop: 0.2 palette(highlight), stop: 0.2 transparent);
}

QTabBar::tab:top:selected {
    background: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0, stop: 0 palette(highlight), stop: 0.2 palette(highlight), stop: 0.2 transparent);
}

QTabBar::tab:!selected {
    color: #888;
}

QTabBar::tab:bottom:!selected {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 palette(light), stop: 0.2 palette(light), stop: 0.2 transparent);
}

QTabBar::tab:top:!selected {
    background: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0, stop: 0 palette(light), stop: 0.2 palette(light), stop: 0.2 transparent);
}

QTabBar::tab:!selected:hover {
    color: #aaa;
}

QTabBar::tab:bottom:!selected:hover {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #666, stop: 0.2 #666, stop: 0.2 transparent);
}

QTabBar::tab:top:!selected:hover {
    background: qlineargradient(x1: 0, y1: 1, x2: 0, y2: 0, stop: 0 #666, stop: 0.2 #666, stop: 0.2 transparent);
}

/*
** Quassel CSS
*/

/* Main Chat Background Override */
ChatView {
    background: #181818;
}
ChatView QScrollBar {
    background: #282a36;
}
ChatView QScrollBar:hover {
    background: #282a36;
}

ChatView QScrollBar::handle {
    border-color: #44475a;
    background: #44475a;
}

ChatView QScrollBar::handle:hover {
    border-color: #44475a;
    background: #44475a;
}

/**/
QStatusBar {}
QStatusBar::item {
    border: none;
}
QStatusBar QLabel {
    color: #888;
}

/* https://github.com/quassel/quassel/blob/master/src/qtui/ui/msgprocessorstatuswidget.ui */
QStatusBar MsgProcessorStatusWidget {}
QStatusBar MsgProcessorStatusWidget QLabel#label {}
QStatusBar MsgProcessorStatusWidget QProgressBar#progressBar {}

/* https://github.com/quassel/quassel/blob/master/src/qtui/ui/coreconnectionstatuswidget.ui */
QStatusBar CoreConnectionStatusWidget {}
QStatusBar CoreConnectionStatusWidget QLabel#messageLabel {}
QStatusBar CoreConnectionStatusWidget QProgressBar#progressBar {}
QStatusBar CoreConnectionStatusWidget QLabel#lagLabel {}
QStatusBar CoreConnectionStatusWidget QLabel#sslLabel {
    qproperty-pixmap: none; /* Hide the SSL status icon */
}


/* Font */
// Will not override if selectors are doubled up eg: "ChatLine, MultiLineEdit {}"
// These will override anything set in Quassel's Settings.
/**
 * Don't bold or style MultiLineEdit text in any way otherwise you will be
 * prone to get weird behaviour in submitting from the Input box.
 * It will randomly bold your input if you do.
 */
ChatLine {
    //font-family: "MingLiU_HKSCS-ExtB", "Courier New", Courier, Monotype;

    //font-size: 13pt;
    //font-weight: bold;
    }
MultiLineEdit {
    //font-family: "MingLiU_HKSCS-ExtB", "Courier New", Courier, Monotype;

    //font-size: 20px;
    //font-weight: normal;
    }
ChatLine#plain {
    //font-weight: bold;
    }

/* Font: UI Global Font */
QWidget {
    //font-family: consolas;
    }
ChatListItem {
    font-family: consolas;
    }
NickListItem {
    font-family: consolas;
    }
StyledLabel#topicLabel {
    font-family: consolas;
    font-size: 14px;
    }


/* Topic Box */
StyledLabel#topicLabel { background: palette(base);  font-family: consolas; }

/* Buffer / Channel List */
/**
    state: inactive, channel-event, unread-message, highlighted
    type: query, channel, network
**/
ChatListItem { foreground: #f8f8f2; }
ChatListItem[state="inactive"] { foreground: #44475a; }
ChatListItem[state="channel-event"] { foreground: #6272a4; } /* palette(button-text) */
ChatListItem[state="unread-message"] { foreground: #f8f8f2; }
ChatListItem[state="highlighted"] { foreground: #44475a; }

ChatListItem[type="network", state="unread-message"] { foreground: #44475a; }
ChatListItem[type="network", state="highlighted"] { foreground: #44475a; }
ChatListItem[type="query", state="unread-message"] { foreground: #44475a; }


/* Nick List */
/**
    state: away
    type: user, category
**/
NickListItem[type="category"] { foreground: #6272a4; }
NickListItem[type="user"] { foreground: #f8f8f2 }
NickListItem[type="user", state="away"] { foreground: #44475a; }



/* Chatbox Line Formatting */
ChatLine[label="highlight"] {
    foreground: #f5f5f5;
    background: #282828;
}

/*
** Option: Bold highlighted text, but not the timestamp.
*/
/*
ChatLine[label="highlight"] { font-weight: bold; }
ChatLine::timestamp[label="highlight"]{ font-weight: normal; }
*/

ChatLine::timestamp[label="highlight"] { foreground: #44475a; }

ChatLine::timestamp {  }

/* ::contents == Message */
ChatLine::contents {
    /* Can only set background */
}

ChatLine#plain { foreground: #f8f8f2; }
ChatLine#notice { foreground: #44475a; }
ChatLine#action { foreground: #565f73; font-style: italic; font-weight: bold; }
ChatLine#nick { foreground: #6272a4; }
ChatLine#mode { foreground: #6272a4; }
ChatLine#join { foreground: #6272a4; }
ChatLine#part { foreground: #6272a4; }
ChatLine#quit { foreground: #6272a4; }
ChatLine#kick { foreground: #6272a4; }
ChatLine#kill { foreground: #6272a4; }
ChatLine#server { foreground: #44475a; }
ChatLine#info { foreground: #44475a; }
ChatLine#error { foreground: #ff5555; }
ChatLine#daychange { foreground: #44475a; }
ChatLine#topic { foreground: #f1fa8c; }
ChatLine#netsplit-join { foreground: #44475a; }
ChatLine#netsplit-quit { foreground: #44475a; }

ChatLine::timestamp {
    foreground: #586e75;
    // Resets the timestemp font during #action and other possible formatting.
    font-style: normal;
    font-weight: normal;
}

ChatLine::url {
    foreground: palette(link);
    //font-style: underline; // Uncomment if you always want an underline on links.
}

/* Sender Colors */
ChatLine::sender#plain[sender="self"] { foreground: #586e75; }

/**
 * The following are the sixteen colours used for the senders.
 * The names are calculated by taking the hash of the nickname.
 * Then take the modulo (the remainder) when divided by 16.
 * Preview: http://i.imgur.com/xeRKI4H.png
 */
ChatLine::sender#plain[sender="0"] { foreground: #96a6c8; }
ChatLine::sender#plain[sender="1"] { foreground: #73c936; }
ChatLine::sender#plain[sender="2"] { foreground: #ffdd33; }
ChatLine::sender#plain[sender="3"] { foreground: #cc8c3c; }
ChatLine::sender#plain[sender="4"] { foreground: #ff4f58; }
ChatLine::sender#plain[sender="5"] { foreground: #9e95c7; }
ChatLine::sender#plain[sender="6"] { foreground: #95a99f; }
ChatLine::sender#plain[sender="7"] { foreground: #8be9fd; }

/* +32 */
ChatLine::sender#plain[sender="8"] { foreground: #96a6c8; }
ChatLine::sender#plain[sender="9"] { foreground: #73c936; }
ChatLine::sender#plain[sender="a"] { foreground: #ffdd33; }
ChatLine::sender#plain[sender="b"] { foreground: #cc8c3c; }
ChatLine::sender#plain[sender="c"] { foreground: #ff4f58; }
ChatLine::sender#plain[sender="d"] { foreground: #9e95c7; }
ChatLine::sender#plain[sender="e"] { foreground: #95a99f; }
ChatLine::sender#plain[sender="f"] { foreground: #8be9fd; }

/*
** mIRC formats
*/
ChatLine[format="bold"] { font-weight: bold;}
ChatLine[format="italic"] { font-style: italic; }
ChatLine[format="underline"] { font-style: underline; }

/* Blues are hard to read. */
ChatLine[fg-color="2"] { foreground: #15a; }
ChatLine[bg-color="2"] { background: #15a; }
ChatLine[fg-color="c"] { foreground: #15f; }
ChatLine[bg-color="c"] { background: #15f; }

/*
** Experimental
*/
BufferViewDock[active=true] {
    /* The circle is hardcoded into the title. */
    /* Color only changes on a refresh (F5) (so it's pointless). */
    /* Also colors the border in Breeze. */
    //color: palette(highlight);
}