9 |
10 | Settings::Settings(QWidget *parent, const QString &setting_path) : QWidget(parent), ui(new Ui::Settings)
11 | {
12 | ui->setupUi(this);
13 | this->setting_path = setting_path;
14 |
15 | #ifdef COLORPICKER_SNAPCRAFT_BUILD
16 | ui->ratePushButton->show();
17 | #else
18 | ui->ratePushButton->hide();
19 | #endif
20 | }
21 |
22 | void Settings::keyPressEvent(QKeyEvent *e)
23 | {
24 | // esc key to close settings widget
25 | if (e->key() == Qt::Key_Escape)
26 | this->close();
27 | }
28 |
29 | void Settings::setAdvanceMode()
30 | {
31 | ui->advance->blockSignals(true);
32 | ui->simple->blockSignals(true);
33 | ui->advance->setChecked(true);
34 | ui->simple->setChecked(false);
35 | ui->advance->blockSignals(false);
36 | ui->simple->blockSignals(false);
37 | }
38 |
39 | void Settings::setSimpleMode()
40 | {
41 | ui->advance->blockSignals(true);
42 | ui->simple->blockSignals(true);
43 | ui->advance->setChecked(false);
44 | ui->simple->setChecked(true);
45 | ui->advance->blockSignals(false);
46 | ui->simple->blockSignals(false);
47 | }
48 |
49 | Settings::~Settings()
50 | {
51 | delete ui;
52 | }
53 |
54 | void Settings::setTheme(const QString &themeName)
55 | {
56 | if (themeName.contains("Dark"))
57 | {
58 | ui->themeComboBox->setCurrentIndex(2);
59 | }
60 | else if (themeName.contains("Flat"))
61 | {
62 | ui->themeComboBox->setCurrentIndex(1);
63 | }
64 | else if (themeName.contains("System"))
65 | {
66 | ui->themeComboBox->setCurrentIndex(0);
67 | }
68 | }
69 |
70 | void Settings::on_clearColorsPushButton_clicked()
71 | {
72 | QFile file(setting_path + "/saved.colors");
73 | file.remove();
74 | emit empty_saved_table();
75 | }
76 |
77 | void Settings::on_donatePushButton_clicked()
78 | {
79 | QDesktopServices::openUrl(QUrl("https://paypal.me/keshavnrj/2"));
80 | }
81 |
82 | void Settings::on_girhubPushButton_clicked()
83 | {
84 | QDesktopServices::openUrl(QUrl("https://github.com/keshavbhatt/ColorPicker"));
85 | }
86 |
87 | void Settings::on_ratePushButton_clicked()
88 | {
89 | QDesktopServices::openUrl(QUrl("snap://color-picker"));
90 | }
91 |
92 | void Settings::on_themeComboBox_currentIndexChanged(const QString &arg1)
93 | {
94 | emit themeChanged(arg1);
95 | }
96 |
97 | void Settings::on_advance_toggled(bool checked)
98 | {
99 | emit switchAdvanceMode(checked);
100 | }
101 |
102 | void Settings::on_simple_toggled(bool checked)
103 | {
104 | emit switchSimpleMode(checked);
105 | }
106 |
107 | void Settings::showAbout()
108 | {
109 | QString mes = "
"
111 | "
"
113 | "
"
115 | "Designed and Developed
"
117 | "by Keshav Bhatt "
119 | "<keshavnrj@gmail.com>
"
120 | "Website: https://ktechpit.com
"
122 | "Runtime: Qt "
124 | QT_VERSION_STR
125 | "
"
126 | "Version: " +
128 | QApplication::applicationVersion() +
129 | "
"
130 | "
"
132 | "More Apps
";
135 |
136 | QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this);
137 | ui->message->setGraphicsEffect(eff);
138 | QPropertyAnimation *a = new QPropertyAnimation(eff, "opacity");
139 | a->setDuration(1000);
140 | a->setStartValue(0);
141 | a->setEndValue(1);
142 | a->setEasingCurve(QEasingCurve::InCurve);
143 | a->start(QPropertyAnimation::DeleteWhenStopped);
144 | ui->message->setText(mes);
145 | ui->message->show();
146 | }
147 |
148 | void Settings::on_message_linkActivated(const QString &link)
149 | {
150 | QDesktopServices::openUrl(QUrl(link));
151 | }
152 |
--------------------------------------------------------------------------------
/src/mainwindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | MainWindow
4 |
5 |
6 |
7 | 0
8 | 0
9 | 445
10 | 445
11 |
12 |
13 |
14 | MainWindow
15 |
16 |
17 |
18 | :/icons/128/color-picker.png:/icons/128/color-picker.png
19 |
20 |
21 |
22 |
23 | 5
24 |
25 |
26 | 0
27 |
28 |
29 | 0
30 |
31 |
32 | 0
33 |
34 |
35 | 0
36 |
37 | -
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 |
45 |
-
46 |
47 |
48 | 0
49 |
50 |
-
51 |
52 |
53 | 0
54 |
55 |
56 | 0
57 |
58 |
59 | 7
60 |
61 |
62 | 7
63 |
64 |
65 | 0
66 |
67 |
-
68 |
69 |
70 | 0
71 |
72 |
73 | 0
74 |
75 |
76 |
77 | -
78 |
79 |
80 | 0
81 |
82 |
83 | 0
84 |
85 |
-
86 |
87 |
88 | Qt::NoFocus
89 |
90 |
91 | Generate selected color shade
92 |
93 |
94 |
95 |
96 |
97 | Shade generator
98 |
99 |
100 |
101 | -
102 |
103 |
104 | Previewer
105 |
106 |
107 | false
108 |
109 |
110 |
111 | 5
112 |
113 |
114 | 5
115 |
116 |
117 | 5
118 |
119 |
120 | 5
121 |
122 |
-
123 |
124 |
125 | Qt::ScrollBarAlwaysOff
126 |
127 |
128 | Qt::ScrollBarAlwaysOff
129 |
130 |
131 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
132 | <html><head><meta name="qrichtext" content="1" /><style type="text/css">
133 | p, li { white-space: pre-wrap; }
134 | </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
135 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>
136 |
137 |
138 | Qt::NoTextInteraction
139 |
140 |
141 |
142 | -
143 |
144 |
145 | 0
146 |
147 |
-
148 |
149 |
150 |
151 | 120
152 | 0
153 |
154 |
155 |
156 | Paste background color ex - red | #ffffff
157 |
158 |
159 |
160 | -
161 |
162 |
163 |
164 | 0
165 | 0
166 |
167 |
168 |
169 | Decrease font size
170 |
171 |
172 |
173 |
174 |
175 |
176 | :/dark/minus.png:/dark/minus.png
177 |
178 |
179 |
180 | 16
181 | 16
182 |
183 |
184 |
185 |
186 | -
187 |
188 |
189 |
190 | 0
191 | 0
192 |
193 |
194 |
195 | Increase font size
196 |
197 |
198 |
199 |
200 |
201 |
202 | :/dark/plus.png:/dark/plus.png
203 |
204 |
205 |
206 | 16
207 | 16
208 |
209 |
210 |
211 |
212 | -
213 |
214 |
215 | Change background color
216 |
217 |
218 | Pick Bg Color
219 |
220 |
221 |
222 | :/dark/picker.png:/dark/picker.png
223 |
224 |
225 |
226 | 16
227 | 16
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 | -
244 |
245 |
246 |
247 | 7
248 |
249 |
250 | 1
251 |
252 |
253 | 7
254 |
255 |
256 | 7
257 |
258 |
-
259 |
260 |
261 | 5
262 |
263 |
264 | 0
265 |
266 |
-
267 |
268 |
269 | ARGB
270 |
271 |
272 |
273 | -
274 |
275 |
276 | -
277 |
278 |
279 | CMYK
280 |
281 |
282 |
283 | -
284 |
285 |
286 | -
287 |
288 |
289 |
290 | 10
291 | 10
292 |
293 |
294 |
295 |
296 | 10
297 | 10
298 |
299 |
300 |
301 | border-radius:10px;
302 |
303 |
304 |
305 |
306 |
307 |
308 | -
309 |
310 |
311 | background-color:transparent;
312 |
313 |
314 | -
315 |
316 |
317 |
318 | -
319 |
320 |
321 | true
322 |
323 |
324 | Select a color code below
325 |
326 |
327 |
328 | -
329 |
330 |
331 | Copy
332 |
333 |
334 |
335 | :/icons/32/clipboard_copy.png:/icons/32/clipboard_copy.png
336 |
337 |
338 |
339 | 16
340 | 16
341 |
342 |
343 |
344 |
345 |
346 |
347 | -
348 |
349 |
350 |
351 | 0
352 | 0
353 |
354 |
355 |
356 | Save Current Color
357 |
358 |
359 |
360 | :/dark/add.png:/dark/add.png
361 |
362 |
363 |
364 | 16
365 | 16
366 |
367 |
368 |
369 |
370 | -
371 |
372 |
373 |
374 | 0
375 | 138
376 |
377 |
378 |
379 | QAbstractScrollArea::AdjustToContentsOnFirstShow
380 |
381 |
382 | QAbstractItemView::NoEditTriggers
383 |
384 |
385 | QAbstractItemView::ScrollPerPixel
386 |
387 |
388 | QAbstractItemView::ScrollPerPixel
389 |
390 |
391 | true
392 |
393 |
394 | false
395 |
396 |
397 | false
398 |
399 |
400 | false
401 |
402 |
403 | false
404 |
405 |
406 |
407 | HTML
408 |
409 |
410 |
411 |
412 | ARGB
413 |
414 |
415 |
416 |
417 | HSV
418 |
419 |
420 |
421 |
422 | RGB
423 |
424 |
425 |
426 |
427 | CMYK
428 |
429 |
430 |
431 |
432 | Color
433 |
434 |
435 |
436 |
437 | Delete
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
474 |
475 |
476 |
477 | :/icons/20/settings.png:/icons/20/settings.png
478 |
479 |
480 | Settings and About
481 |
482 |
483 | Ctrl+Shift+P
484 |
485 |
486 | Qt::ApplicationShortcut
487 |
488 |
489 |
490 |
491 |
492 | :/icons/20/close.png:/icons/20/close.png
493 |
494 |
495 | Quit
496 |
497 |
498 | Ctrl+Q
499 |
500 |
501 | Qt::ApplicationShortcut
502 |
503 |
504 |
505 |
506 |
507 | :/icons/32/switch.png:/icons/32/switch.png
508 |
509 |
510 | Switch Mode
511 |
512 |
513 | Ctrl+S
514 |
515 |
516 | Qt::WindowShortcut
517 |
518 |
519 |
520 |
521 |
522 |
523 | Previewer
524 | QTextBrowser
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
--------------------------------------------------------------------------------
/src/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | #include "mainwindow.h"
2 | #include "ui_mainwindow.h"
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 |
16 | #include "gridlayoututil.h"
17 |
18 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
19 | {
20 | ui->setupUi(this);
21 | this->setWindowTitle(QCoreApplication::applicationName());
22 |
23 | settings.setObjectName("app_settings");
24 | setting_path = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
25 |
26 | if (!QDir(setting_path).exists())
27 | {
28 | QDir d(setting_path);
29 | d.mkpath(setting_path);
30 | }
31 |
32 | settingsWidget = new Settings(this, setting_path);
33 | settingsWidget->setWindowTitle(QCoreApplication::applicationName() + " | Settings");
34 | settingsWidget->setWindowFlags(Qt::Window);
35 | connect(settingsWidget, &Settings::empty_saved_table, [=]() {
36 | ui->saved->clearContents();
37 | ui->saved->model()->removeRows(0, ui->saved->rowCount());
38 | });
39 | connect(settingsWidget, &Settings::themeChanged, [=](const QString &themeName) {
40 | if (themeName.contains("Dark"))
41 | {
42 | settings.setValue("theme", themeName);
43 | setStyle(":/dark.qss");
44 | }
45 | else if (themeName.contains("Flat"))
46 | {
47 | settings.setValue("theme", themeName);
48 | setStyle(":/light.qss");
49 | }
50 | else if (themeName.contains("System"))
51 | {
52 | settings.setValue("theme", themeName);
53 | this->setStyleSheet("");
54 | }
55 | foreach (QSpinBox *spinbox, colorDialog->findChildren())
56 | {
57 | spinbox->setFixedSize(54, spinbox->height());
58 | }
59 | this->resize(this->minimumSize());
60 | });
61 |
62 | connect(settingsWidget, &Settings::switchSimpleMode, [=](bool simpleMode) {
63 | if (simpleMode)
64 | {
65 | settings.setValue("mode", "simple");
66 | switchSimpleMode();
67 | qDebug() << "switch simple mode";
68 | }
69 | });
70 |
71 | connect(settingsWidget, &Settings::switchAdvanceMode, [=](bool advanceMode) {
72 | if (advanceMode)
73 | {
74 | settings.setValue("mode", "advance");
75 | switchAdvanceMode();
76 | qDebug() << "switch advance mode";
77 | }
78 | });
79 |
80 | colorDialog = new ColorDialog(this, QColor("green"));
81 | colorDialog->layout()->setContentsMargins(7, 0, 0, 0);
82 | ui->colorWidgetLayout->addWidget(colorDialog);
83 | ui->saved->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
84 | ui->saved->verticalHeader()->setVisible(true);
85 | ui->saved->setSelectionMode(QAbstractItemView::NoSelection);
86 |
87 | connect(colorDialog, &ColorDialog::currentColorChanged, [=](const QColor &color) {
88 | ui->argb->setText(color.name(QColor::HexArgb));
89 |
90 | ui->cmyk->setText(getCMYK(color));
91 | ui->code->setText(color.name());
92 | ui->type->setText("HTML");
93 | ui->colorIndicator->setStyleSheet("background-color:" + ui->code->text().trimmed());
94 | ui->textBrowser->clear();
95 | ui->textBrowser->setText(""
97 | "What is Lorem Ipsum?
"
98 | "What is Lorem Ipsum?
"
99 | "What is Lorem Ipsum?
"
100 | "What is Lorem Ipsum?
"
101 | "What is Lorem Ipsum?
"
102 | "" +
103 | ui->textBrowser->getParaText() +
104 | "
"
105 | "");
106 | QString fontColor = QColor("white").lighter(-color.lightness() + 300).name();
107 | ui->pattern_generator->setStyleSheet("text-align:left;color:" + fontColor +
108 | ";padding:4px;border:none;background-color: "
109 | "qlineargradient(spread:reflect,"
110 | " x1:0, y1:0.482955, x2:1, y2:0.5,"
111 | " stop:0 rgba(" +
112 | QString::number(color.red()) + ", " + QString::number(color.green()) +
113 | ", " + QString::number(color.blue()) +
114 | ", 255),"
115 | " stop:1 rgba(" +
116 | QString::number(color.red()) + ", " + QString::number(color.green()) +
117 | ", " + QString::number(color.blue()) + ", 0));");
118 | ui->saved->clearSelection();
119 | });
120 | colorDialog->setCurrentColor(QColor("red")); // TODO load color from last session
121 |
122 | connect(ui->bgColor, &QLineEdit::textChanged, [=](const QString &text) {
123 | QColor color = QColor(text.trimmed());
124 | if (color.isValid())
125 | {
126 | ui->textBrowser->setBackground(color);
127 | settings.setValue("background", color.name());
128 | }
129 | });
130 |
131 | foreach (QPushButton *btn, colorDialog->findChildren())
132 | {
133 | if (btn->text().contains("Pick Screen Color"))
134 | {
135 | btn->setIconSize(QSize(18, 18));
136 | btn->setIcon(QIcon(":/dark/picker.png"));
137 | btn->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
138 | btn->setToolTip("Pick color from Screen (" + btn->shortcut().toString() + ")");
139 | }
140 | if (btn->text().contains("Add to Custom Colors"))
141 | {
142 | btn->setIconSize(QSize(18, 18));
143 | btn->setIcon(QIcon(":/dark/plus.png"));
144 | btn->setText("Add to Temporary Swatch");
145 | }
146 | }
147 |
148 | foreach (QLabel *label, colorDialog->findChildren())
149 | {
150 | label->setText(label->text().replace("&", ""));
151 | if (label->text().contains("Custom colors"))
152 | {
153 | label->setTextFormat(Qt::RichText);
154 | label->setText(
155 | "Temporary Swatch
Click \"Add to Temporary Swatch\"
to save color permanently.
or
"
156 | "Drag color to save for this session.");
157 | }
158 | }
159 |
160 | foreach (QLineEdit *ledit, colorDialog->findChildren())
161 | {
162 | if (ledit->text() == "#ff0000")
163 | {
164 | ledit->setMaximumWidth(40000);
165 | }
166 | }
167 |
168 | load_saved_colors();
169 |
170 | restoreGeometry(settings.value("geometry").toByteArray());
171 | restoreState(settings.value("windowState").toByteArray());
172 |
173 | // set mode
174 | if (settings.value("mode", "advance").toString() == "advance")
175 | {
176 | switchAdvanceMode();
177 | settingsWidget->setAdvanceMode();
178 | }
179 | else
180 | {
181 | switchSimpleMode();
182 | settingsWidget->setSimpleMode();
183 | }
184 |
185 | pattern_widget = new QWidget(this);
186 | pattern_widget->setWindowFlags(Qt::Dialog);
187 | pattern_widget->setWindowTitle(QApplication::applicationName() + " | Color Shade");
188 | _ui_pattern.setupUi(pattern_widget);
189 | // intetionally placed before connection
190 | _ui_pattern.factor_spin->setValue(settings.value("pattern_factor", 10).toInt());
191 | ui->bgColor->setText(settings.value("background", "white").toString());
192 |
193 | QFont font = QFont(ui->textBrowser->font());
194 | font.setPixelSize(settings.value("zoomF", 14).toInt());
195 | ui->textBrowser->setFont(font);
196 |
197 | connect(_ui_pattern.factor_spin, static_cast(&QSpinBox::valueChanged), [=](int value) {
198 | _patter_factor = value;
199 | settings.setValue("pattern_factor", value);
200 | ui->pattern_generator->click();
201 | });
202 |
203 | // keep this function located at last load theme settings
204 | settingsWidget->setTheme(settings.value("theme", "System").toString());
205 | }
206 |
207 | void MainWindow::switchAdvanceMode()
208 | {
209 | settings.setValue("mode", "advance");
210 | this->setWindowTitle(QApplication::applicationName() + " | AdvanceMode");
211 | ui->advanceWidget->show();
212 | this->adjustSize();
213 | }
214 | void MainWindow::switchSimpleMode()
215 | {
216 | settings.setValue("mode", "simple");
217 | this->setWindowTitle(QApplication::applicationName() + " | SimpleMode");
218 | ui->advanceWidget->hide();
219 | this->hide();
220 | this->show();
221 | this->adjustSize();
222 | }
223 |
224 | void MainWindow::setStyle(QString fname)
225 | {
226 | if (fname.contains("light"))
227 | {
228 | ui->saved->setShowGrid(false);
229 | }
230 | else
231 | {
232 | ui->saved->setShowGrid(true);
233 | }
234 | QFile styleSheet(fname);
235 | if (!styleSheet.open(QIODevice::ReadOnly))
236 | {
237 | qWarning("Unable to open file");
238 | return;
239 | }
240 | this->setStyleSheet(styleSheet.readAll());
241 | styleSheet.close();
242 | }
243 |
244 | MainWindow::~MainWindow()
245 | {
246 | delete ui;
247 | }
248 |
249 | void MainWindow::load_saved_colors()
250 | {
251 | QFile file(setting_path + "/saved.colors");
252 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
253 | return;
254 |
255 | QTextStream in(&file);
256 | while (!in.atEnd())
257 | {
258 | QString line = in.readLine();
259 | // qDebug()<saved->rowCount();
272 | if (row == 0)
273 | {
274 | nextRow = 0;
275 | }
276 | else
277 | {
278 | nextRow = row++;
279 | }
280 | if (saving)
281 | {
282 | QColor color = colorDialog->currentColor();
283 | // save color to saved.colors file
284 | save_color(color);
285 | }
286 | // data
287 | QString html = color.name();
288 | QString hsv = getHSV(color);
289 | QString hexArgb = color.name(QColor::HexArgb);
290 | QString rgb = getRGB(color);
291 | QString cymk = getCMYK(color);
292 |
293 | QStringList columnData;
294 | columnData << html << hexArgb << hsv << rgb << cymk << "color"
295 | << "delete";
296 |
297 | // qDebug()<saved->insertRow(nextRow);
300 | // add column
301 | for (int i = 0; i < columnData.count(); i++)
302 | {
303 |
304 | if (columnData.at(i) == "color")
305 | {
306 | QPushButton *color = new QPushButton(0);
307 | color->setStyleSheet("background-color:" + html + ";border:0px;");
308 | connect(color, &QPushButton::clicked, [=]() {
309 | colorDialog->setCurrentColor(QColor(html));
310 | ui->colorIndicator->setStyleSheet("background-color:" + html);
311 | ui->type->setText("HTML");
312 | ui->code->setText(QColor(html).name());
313 | });
314 | ui->saved->setCellWidget(nextRow, i, color);
315 | this->update();
316 | }
317 | else if (columnData.at(i) == "delete")
318 | {
319 | QPushButton *del = new QPushButton("Delete", 0);
320 | del->setIcon(QIcon(":/dark/delete.png"));
321 | del->setStyleSheet("border:0px;");
322 | connect(del, &QPushButton::clicked, [=]() {
323 | delete_color_from_saved_colors_file(hexArgb);
324 | ui->saved->removeRow(ui->saved->rowAt(del->y()));
325 | ui->type->setText("-");
326 | ui->colorIndicator->setStyleSheet("background-color:transparent;");
327 | ui->code->clear();
328 | });
329 | ui->saved->setCellWidget(nextRow, i, del);
330 | // hack to forcibly make the inner table widgets's size
331 | ui->saved->viewport()->resize(ui->saved->viewport()->width(), ui->saved->viewport()->height() + 1);
332 | ui->saved->viewport()->resize(ui->saved->viewport()->width(), ui->saved->viewport()->height() - 1);
333 | }
334 | else
335 | {
336 | ui->saved->setItem(nextRow, i, new QTableWidgetItem(columnData.at(i)));
337 | }
338 | }
339 | }
340 | else
341 | {
342 | invalidColor();
343 | }
344 | }
345 |
346 | void MainWindow::delete_color_from_saved_colors_file(const QString hexArgb)
347 | {
348 | QFile file(setting_path + "/saved.colors");
349 | if (file.open(QIODevice::ReadWrite | QIODevice::Text))
350 | {
351 | QString s;
352 | QTextStream t(&file);
353 | while (!t.atEnd())
354 | {
355 | QString line = t.readLine();
356 | if (!line.contains(hexArgb))
357 | s.append(line + "\n");
358 | }
359 | file.resize(0);
360 | t << s;
361 | file.close();
362 | }
363 | ui->type->setText("-");
364 | ui->colorIndicator->setStyleSheet("background-color:transparent;");
365 | ui->code->clear();
366 | }
367 |
368 | void MainWindow::save_color(const QColor color)
369 | {
370 | QFile file(setting_path + "/saved.colors");
371 | if (!file.open(QIODevice::Append | QIODevice::Text))
372 | return;
373 | QTextStream out(&file);
374 | out << color.name(QColor::HexArgb) << "\n";
375 | file.close();
376 | }
377 |
378 | void MainWindow::on_save_clicked()
379 | {
380 | QColor color = colorDialog->currentColor();
381 | add_to_table(color.name(QColor::HexArgb), true);
382 | ui->saved->scrollToBottom();
383 | }
384 |
385 | QString MainWindow::getHSV(const QColor color)
386 | {
387 | int h = color.convertTo(QColor::Hsv).hsvHue();
388 | int s = color.convertTo(QColor::Hsv).hsvSaturation();
389 | int v = color.convertTo(QColor::Hsv).value();
390 | return QString::number(h) + " " + QString::number(s) + " " + QString::number(v);
391 | }
392 |
393 | QString MainWindow::getRGB(const QColor color)
394 | {
395 | int r = color.convertTo(QColor::Rgb).red();
396 | int g = color.convertTo(QColor::Rgb).green();
397 | int b = color.convertTo(QColor::Rgb).blue();
398 | return QString::number(r) + "," + QString::number(g) + "," + QString::number(b);
399 | }
400 |
401 | QString MainWindow::getCMYK(const QColor color)
402 | {
403 | int c = color.convertTo(QColor::Cmyk).cyan();
404 | int m = color.convertTo(QColor::Cmyk).magenta();
405 | int y = color.convertTo(QColor::Cmyk).yellow();
406 | int k = color.convertTo(QColor::Cmyk).black();
407 | return QString::number(c) + "," + QString::number(m) + "," + QString::number(y) + "," + QString::number(k);
408 | }
409 |
410 | void MainWindow::on_saved_cellClicked(int row, int column)
411 | {
412 |
413 | if (ui->saved->item(row, column) == nullptr)
414 | return;
415 | QString colorname = ui->saved->item(row, column)->text();
416 |
417 | QColor color(colorname);
418 |
419 | int x, y, z, k;
420 | if (colorname.contains(","))
421 | {
422 | QStringList val = colorname.split(",");
423 | if (val.count() == 4)
424 | {
425 | x = val.at(0).toInt();
426 | y = val.at(1).toInt();
427 | z = val.at(2).toInt();
428 | k = val.at(3).toInt();
429 | color = QColor::fromCmyk(x, y, z, k);
430 | qDebug() << color.isValid();
431 | }
432 | else
433 | {
434 | x = val.at(0).toInt();
435 | y = val.at(1).toInt();
436 | z = val.at(2).toInt();
437 | color = QColor::fromRgb(x, y, z);
438 | }
439 | }
440 | else if (colorname.contains(" "))
441 | {
442 | QStringList val = colorname.split(" ");
443 | x = val.at(0).toInt();
444 | y = val.at(1).toInt();
445 | z = val.at(2).toInt();
446 | color = QColor::fromHsv(x, y, z);
447 | }
448 | if (color.isValid())
449 | {
450 | colorDialog->setCurrentColor(color);
451 | ui->colorIndicator->setStyleSheet("background-color:" + color.name());
452 | ui->type->setText(ui->saved->horizontalHeaderItem(column)->text());
453 | if (colorname.contains(" "))
454 | {
455 | ui->code->setText(colorname.replace(" ", ","));
456 | }
457 | else
458 | {
459 | ui->code->setText(colorname);
460 | }
461 | }
462 | else
463 | {
464 | invalidColor();
465 | }
466 | }
467 |
468 | void MainWindow::invalidColor()
469 | {
470 | QMessageBox msgBox;
471 | msgBox.setText("Selected color code is invalid.");
472 | msgBox.setStandardButtons(QMessageBox::Ok);
473 | msgBox.setDefaultButton(QMessageBox::Ok);
474 | msgBox.exec();
475 | }
476 |
477 | void MainWindow::on_actionSettingsAndAbout_triggered()
478 | {
479 | settingsWidget->move(QApplication::desktop()->screen()->rect().center() - this->rect().center());
480 | settingsWidget->showNormal();
481 | settingsWidget->showAbout();
482 | }
483 |
484 | void MainWindow::on_actionQuit_triggered()
485 | {
486 | qApp->quit();
487 | }
488 |
489 | void MainWindow::on_copy_clicked()
490 | {
491 | QClipboard *clipboard = QGuiApplication::clipboard();
492 | ui->code->selectAll();
493 | QString code = ui->code->text();
494 | if (code.contains(" "))
495 | {
496 | code = code.replace(" ", ",");
497 | }
498 | clipboard->setText(code);
499 | }
500 |
501 | void MainWindow::on_code_textChanged(const QString &arg1)
502 | {
503 | ui->copy->setEnabled(!arg1.isEmpty());
504 | }
505 |
506 | void MainWindow::closeEvent(QCloseEvent *closeEv)
507 | {
508 | settings.setValue("geometry", saveGeometry());
509 | settings.setValue("windowState", saveState());
510 | closeEv->accept();
511 | }
512 |
513 | void MainWindow::on_actionswitchMode_triggered()
514 | {
515 | // set mode
516 | if (settings.value("mode", "advance").toString() == "advance")
517 | {
518 | switchSimpleMode();
519 | settingsWidget->setSimpleMode();
520 | }
521 | else if (settings.value("mode", "advance").toString() == "simple")
522 | {
523 | switchAdvanceMode();
524 | settingsWidget->setAdvanceMode();
525 | }
526 | }
527 |
528 | void MainWindow::on_pattern_generator_clicked()
529 | {
530 | // clear
531 | for (int i = 0; i < _ui_pattern.gridLayout->columnCount(); i++)
532 | {
533 | GridLayoutUtil::removeColumn(_ui_pattern.gridLayout, i, true);
534 | }
535 | QColor color = QColor(ui->code->text().trimmed());
536 | if (color.isValid())
537 | {
538 | pattern_widget->setWindowTitle(QApplication::applicationName() + " | Color Shade " + color.name());
539 | // draw pattern
540 | int d_max = 300;
541 | int d_min = 0;
542 | int factor_diff = settings.value("pattern_factor", 10).toInt();
543 | int cols = 10;
544 | int itemscount = (d_max - d_min) / factor_diff;
545 | int factor = 300;
546 | for (int i = 0; i < itemscount; i++)
547 | {
548 | QString colorName, fontColor, factorString;
549 | if (factor <= 100)
550 | {
551 | factor = factor - factor_diff;
552 | int l_factor = 100 - (factor - 100);
553 | colorName = color.lighter(l_factor).name() + "*" + QString::number(l_factor - 100) + "% Lighter";
554 | fontColor = color.darker(l_factor + 50).name();
555 | }
556 | else
557 | {
558 | factor = factor - factor_diff;
559 | int d_factor;
560 | if (factor <= 400)
561 | d_factor = factor / 3;
562 | if (factor <= 300)
563 | d_factor = factor / 3;
564 | if (factor <= 200)
565 | d_factor = factor / 2;
566 | if (factor <= 100)
567 | d_factor = factor;
568 | colorName = color.darker(factor).name() + "*" + QString::number(d_factor) + "% Darker";
569 | fontColor = QColor("white").lighter(factor).name();
570 | }
571 | QPushButton *colorWidget = new QPushButton;
572 | colorWidget->setFocusPolicy(Qt::NoFocus);
573 | QString colorNameHash = QString(colorName).split("*").first();
574 | factorString = colorName.split("*").last();
575 | colorWidget->setStyleSheet("QPushButton{border:none;background:" + colorNameHash + ";color:" + fontColor +
576 | ";}");
577 | colorWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
578 | connect(colorWidget, &QPushButton::clicked,
579 | [colorNameHash, this]() { colorDialog->setCurrentColor(QColor(colorNameHash.trimmed())); });
580 | colorWidget->setText(colorNameHash + "\n" + factorString);
581 | int row = _ui_pattern.gridLayout->count() / cols;
582 | int col = _ui_pattern.gridLayout->count() % cols;
583 | _ui_pattern.gridLayout->addWidget(colorWidget, row, col);
584 | }
585 |
586 | if (!pattern_widget->isVisible())
587 | {
588 | pattern_widget->show();
589 | }
590 | }
591 | else
592 | {
593 | qDebug() << "INVALID COLOR cannot generate pattern";
594 | }
595 | }
596 |
597 | void MainWindow::on_pickBackground_clicked()
598 | {
599 | if (cDialog == nullptr)
600 | {
601 | cDialog = new QColorDialog(this);
602 | cDialog->setWindowFlags(Qt::Dialog);
603 | cDialog->setOptions(QColorDialog::NoButtons | QColorDialog::DontUseNativeDialog);
604 | foreach (QPushButton *btn, cDialog->findChildren())
605 | {
606 | if (btn->text().contains("Pick Screen Color"))
607 | {
608 | screenPicker = btn;
609 | }
610 | }
611 | }
612 | connect(cDialog, &QColorDialog::currentColorChanged, [=](const QColor color) {
613 | ui->textBrowser->setBackground(color);
614 | ui->bgColor->setText(color.name());
615 | });
616 | if (screenPicker != nullptr)
617 | {
618 | screenPicker->click();
619 | }
620 | }
621 |
622 | void MainWindow::on_zoomin_clicked()
623 | {
624 | QFont font = QFont(ui->textBrowser->font());
625 | font.setPixelSize(ui->textBrowser->fontInfo().pixelSize() + 1);
626 | ui->textBrowser->setFont(font);
627 | settings.setValue("zoomF", ui->textBrowser->fontInfo().pixelSize());
628 | }
629 |
630 | void MainWindow::on_zoomout_clicked()
631 | {
632 | QFont font = QFont(ui->textBrowser->font());
633 | font.setPixelSize(ui->textBrowser->fontInfo().pixelSize() - 1);
634 | ui->textBrowser->setFont(font);
635 | settings.setValue("zoomF", ui->textBrowser->fontInfo().pixelSize());
636 | }
637 |
--------------------------------------------------------------------------------
/src/dark.qss:
--------------------------------------------------------------------------------
1 | /*
2 | * BreezeDark stylesheet.
3 | *
4 | * :author: Colin Duquesnoy
5 | * :editor: Alex Huszagh
6 | * :license: MIT, see LICENSE.md
7 | *
8 | * This is originally a fork of QDarkStyleSheet, and is based on Breeze/
9 | * BreezeDark color scheme, but is in no way affiliated with KDE.
10 | *
11 | * ---------------------------------------------------------------------
12 | * The MIT License (MIT)
13 | *
14 | * Copyright (c) <2013-2014>
15 | * Copyright (c) <2015-2016>
16 | *
17 | * Permission is hereby granted, free of charge, to any person obtaining
18 | * a copy of this software and associated documentation files (the
19 | * "Software"), to deal in the Software without restriction, including
20 | * without limitation the rights to use, copy, modify, merge, publish,
21 | * distribute, sublicense, and/or sell copies of the Software, and to
22 | * permit persons to whom the Software is furnished to do so, subject to
23 | * the following conditions:
24 | *
25 | * The above copyright notice and this permission notice shall be included in
26 | * all copies or substantial portions of the Software.
27 | *
28 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
29 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 | * ---------------------------------------------------------------------
36 | */
37 |
38 | QToolTip
39 | {
40 | border: 0.1ex solid #eff0f1;
41 | background-color: #31363b;
42 | alternate-background-color: #3b4045;
43 | color: #eff0f1;
44 | padding: 0.5ex;
45 | opacity: 200;
46 | }
47 |
48 | QWidget
49 | {
50 | color: #eff0f1;
51 | background-color: #31363b;
52 | selection-background-color:#3daee9;
53 | selection-color: #eff0f1;
54 | background-clip: border;
55 | border-image: none;
56 | border: 0px transparent black;
57 | outline: 0;
58 | }
59 |
60 | QWidget:item:hover
61 | {
62 | background-color: #3daee9;
63 | color: #eff0f1;
64 | }
65 |
66 | QWidget:item:selected
67 | {
68 | background-color: #3daee9;
69 | }
70 |
71 |
72 | QCheckBox
73 | {
74 | spacing: 0.5ex;
75 | outline: none;
76 | color: #eff0f1;
77 | margin-bottom: 0.2ex;
78 | opacity: 200;
79 | }
80 |
81 | QCheckBox:disabled
82 | {
83 | color: #76797c;
84 | }
85 |
86 | QGroupBox::indicator
87 | {
88 | margin-left: 0.2ex;
89 | }
90 |
91 | QCheckBox::indicator:unchecked,
92 | QCheckBox::indicator:unchecked:focus
93 | {
94 | border-image: url(:/dark/checkbox_unchecked_disabled.svg);
95 | }
96 |
97 | QCheckBox::indicator:unchecked:hover,
98 | QCheckBox::indicator:unchecked:pressed,
99 | QGroupBox::indicator:unchecked:hover,
100 | QGroupBox::indicator:unchecked:focus,
101 | QGroupBox::indicator:unchecked:pressed
102 | {
103 | border: none;
104 | border-image: url(:/dark/checkbox_unchecked.svg);
105 | }
106 |
107 | QCheckBox::indicator:checked
108 | {
109 | border-image: url(:/dark/checkbox_checked.svg);
110 | }
111 |
112 | QCheckBox::indicator:checked:hover,
113 | QCheckBox::indicator:checked:focus,
114 | QCheckBox::indicator:checked:pressed,
115 | QGroupBox::indicator:checked:hover,
116 | QGroupBox::indicator:checked:focus,
117 | QGroupBox::indicator:checked:pressed
118 | {
119 | border: none;
120 | border-image: url(:/dark/checkbox_checked.svg);
121 | }
122 |
123 | QCheckBox::indicator:indeterminate
124 | {
125 | border-image: url(:/dark/checkbox_indeterminate.svg);
126 | }
127 |
128 | QCheckBox::indicator:indeterminate:focus,
129 | QCheckBox::indicator:indeterminate:hover,
130 | QCheckBox::indicator:indeterminate:pressed
131 | {
132 | border-image: url(:/dark/checkbox_indeterminate.svg);
133 | }
134 |
135 | QCheckBox::indicator:indeterminate:disabled
136 | {
137 | border-image: url(:/dark/checkbox_indeterminate_disabled.svg);
138 | }
139 |
140 | QCheckBox::indicator:checked:disabled,
141 | QGroupBox::indicator:checked:disabled
142 | {
143 | border-image: url(:/dark/checkbox_checked_disabled.svg);
144 | }
145 |
146 | QCheckBox::indicator:unchecked:disabled,
147 | QGroupBox::indicator:unchecked:disabled
148 | {
149 | border-image: url(:/dark/checkbox_unchecked_disabled.svg);
150 | }
151 |
152 | QRadioButton
153 | {
154 | spacing: 0.5ex;
155 | outline: none;
156 | color: #eff0f1;
157 | margin-bottom: 0.2ex;
158 | }
159 |
160 | QRadioButton:disabled
161 | {
162 | color: #76797c;
163 | }
164 |
165 | QRadioButton::indicator:unchecked,
166 | QRadioButton::indicator:unchecked:focus
167 | {
168 | border-image: url(:/dark/radio_unchecked_disabled.svg);
169 | }
170 |
171 |
172 | QRadioButton::indicator:unchecked:hover,
173 | QRadioButton::indicator:unchecked:pressed
174 | {
175 | border: none;
176 | outline: none;
177 | border-image: url(:/dark/radio_unchecked.svg);
178 | }
179 |
180 |
181 | QRadioButton::indicator:checked
182 | {
183 | border: none;
184 | outline: none;
185 | border-image: url(:/dark/radio_checked.svg);
186 | }
187 |
188 | QRadioButton::indicator:checked:hover,
189 | QRadioButton::indicator:checked:focus,
190 | QRadioButton::indicator:checked:pressed
191 | {
192 | border: none;
193 | outline: none;
194 | border-image: url(:/dark/radio_checked.svg);
195 | }
196 |
197 | QRadioButton::indicator:checked:disabled
198 | {
199 | outline: none;
200 | border-image: url(:/dark/radio_checked_disabled.svg);
201 | }
202 |
203 | QRadioButton::indicator:unchecked:disabled
204 | {
205 | border-image: url(:/dark/radio_unchecked_disabled.svg);
206 | }
207 |
208 | QMenuBar
209 | {
210 | background-color: #31363b;
211 | color: #eff0f1;
212 | }
213 |
214 | QMenuBar::item
215 | {
216 | background: transparent;
217 | }
218 |
219 | QMenuBar::item:selected
220 | {
221 | background: transparent;
222 | border: 0.1ex solid #76797c;
223 | }
224 |
225 | QMenuBar::item:pressed
226 | {
227 | border: 0.1ex solid #76797c;
228 | background-color: #3daee9;
229 | color: #eff0f1;
230 | margin-bottom: -0.1ex;
231 | padding-bottom: 0.1ex;
232 | }
233 |
234 | QMenu
235 | {
236 | border: 0.1ex solid #76797c;
237 | color: #eff0f1;
238 | margin: 0.2ex;
239 | }
240 |
241 | QMenu::icon
242 | {
243 | margin: 0.5ex;
244 | }
245 |
246 | QMenu::item
247 | {
248 | padding: 0.5ex 3ex 0.5ex 3ex;
249 | margin-left: 0.5ex;
250 | border: 0.1ex solid transparent; /* reserve space for selection border */
251 | }
252 |
253 | QMenu::item:selected
254 | {
255 | color: #eff0f1;
256 | }
257 |
258 | QMenu::separator
259 | {
260 | height: 0.2ex;
261 | background: lightblue;
262 | margin-left: 1ex;
263 | margin-right: 0.5ex;
264 | }
265 |
266 | /* non-exclusive indicator = check box style indicator
267 | (see QActionGroup::setExclusive) */
268 | QMenu::indicator:non-exclusive:unchecked
269 | {
270 | border-image: url(:/dark/checkbox_unchecked_disabled.svg);
271 | }
272 |
273 | QMenu::indicator:non-exclusive:unchecked:selected
274 | {
275 | border-image: url(:/dark/checkbox_unchecked_disabled.svg);
276 | }
277 |
278 | QMenu::indicator:non-exclusive:checked
279 | {
280 | border-image: url(:/dark/checkbox_checked.svg);
281 | }
282 |
283 | QMenu::indicator:non-exclusive:checked:selected
284 | {
285 | border-image: url(:/dark/checkbox_checked.svg);
286 | }
287 |
288 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
289 | QMenu::indicator:exclusive:unchecked
290 | {
291 | border-image: url(:/dark/radio_unchecked_disabled.svg);
292 | }
293 |
294 | QMenu::indicator:exclusive:unchecked:selected
295 | {
296 | border-image: url(:/dark/radio_unchecked_disabled.svg);
297 | }
298 |
299 | QMenu::indicator:exclusive:checked
300 | {
301 | border-image: url(:/dark/radio_checked.svg);
302 | }
303 |
304 | QMenu::indicator:exclusive:checked:selected
305 | {
306 | border-image: url(:/dark/radio_checked.svg);
307 | }
308 |
309 | QMenu::right-arrow
310 | {
311 | margin: 0.5ex;
312 | border-image: url(:/light/right_arrow.svg);
313 | width: 0.6ex;
314 | height: 0.9ex;
315 | }
316 |
317 |
318 | QWidget:disabled
319 | {
320 | color: #454545;
321 | background-color: #31363b;
322 | }
323 |
324 | QAbstractItemView
325 | {
326 | alternate-background-color: #31363b;
327 | color: #eff0f1;
328 | border: 0.1ex solid 3A3939;
329 | border-radius: 0.2ex;
330 | }
331 |
332 |
333 |
334 | QTabWidget:focus,
335 | QCheckBox:focus,
336 | QRadioButton:focus,
337 | QSlider:focus
338 | {
339 | border: none;
340 | }
341 |
342 | QLineEdit
343 | {
344 | background-color: #232629;
345 | padding: 0.5ex;
346 | border-style: solid;
347 | border: 0.1ex solid #76797c;
348 | border-radius: 0.2ex;
349 | color: #eff0f1;
350 | }
351 |
352 | QGroupBox
353 | {
354 | border: 0.1ex solid #76797c;
355 | border-radius: 0.2ex;
356 | padding-top: 1ex;
357 | margin-top: 1ex;
358 | }
359 |
360 | QGroupBox::title
361 | {
362 | subcontrol-origin: margin;
363 | subcontrol-position: top center;
364 | padding-left: 0.1ex;
365 | padding-right: 0.1ex;
366 | margin-top: -0.7ex;
367 | }
368 |
369 | QAbstractScrollArea
370 | {
371 | border-radius: 0.2ex;
372 | border: 0.1ex solid #76797c;
373 | background-color: transparent;
374 | }
375 |
376 | QScrollBar:horizontal
377 | {
378 | height: 1.5ex;
379 | margin: 0.3ex 1.5ex 0.3ex 1.5ex;
380 | border: 0.1ex transparent #2A2929;
381 | border-radius: 0.4ex;
382 | background-color: #2A2929;
383 | }
384 |
385 | QScrollBar::handle:horizontal
386 | {
387 | background-color: #3daee9;
388 | min-width: 0.5ex;
389 | border-radius: 0.4ex;
390 | }
391 |
392 | QScrollBar::add-line:horizontal
393 | {
394 | margin: 0px 0.3ex 0px 0.3ex;
395 | border-image: url(:/dark/right_arrow_disabled.svg);
396 | width: 1ex;
397 | height: 1ex;
398 | subcontrol-position: right;
399 | subcontrol-origin: margin;
400 | }
401 |
402 | QScrollBar::sub-line:horizontal
403 | {
404 | margin: 0ex 0.3ex 0ex 0.3ex;
405 | border-image: url(:/dark/left_arrow_disabled.svg);
406 | width: 1ex;
407 | height: 1ex;
408 | subcontrol-position: left;
409 | subcontrol-origin: margin;
410 | }
411 |
412 | QScrollBar::add-line:horizontal:hover,
413 | QScrollBar::add-line:horizontal:on
414 | {
415 | border-image: url(:/dark/right_arrow.svg);
416 | width: 1ex;
417 | height: 1ex;
418 | subcontrol-position: right;
419 | subcontrol-origin: margin;
420 | }
421 |
422 |
423 | QScrollBar::sub-line:horizontal:hover,
424 | QScrollBar::sub-line:horizontal:on
425 | {
426 | border-image: url(:/dark/left_arrow.svg);
427 | width: 1ex;
428 | height: 1ex;
429 | subcontrol-position: left;
430 | subcontrol-origin: margin;
431 | }
432 |
433 | QScrollBar::up-arrow:horizontal,
434 | QScrollBar::down-arrow:horizontal
435 | {
436 | background: none;
437 | }
438 |
439 |
440 | QScrollBar::add-page:horizontal,
441 | QScrollBar::sub-page:horizontal
442 | {
443 | background: none;
444 | }
445 |
446 | QScrollBar:vertical
447 | {
448 | background-color: #2A2929;
449 | width: 1.5ex;
450 | margin: 1.5ex 0.3ex 1.5ex 0.3ex;
451 | border: 0.1ex transparent #2A2929;
452 | border-radius: 0.4ex;
453 | }
454 |
455 | QScrollBar::handle:vertical
456 | {
457 | background-color: #3daee9;
458 | min-height: 0.5ex;
459 | border-radius: 0.4ex;
460 | }
461 |
462 | QScrollBar::sub-line:vertical
463 | {
464 | margin: 0.3ex 0ex 0.3ex 0ex;
465 | border-image: url(:/dark/up_arrow_disabled.svg);
466 | height: 1ex;
467 | width: 1ex;
468 | subcontrol-position: top;
469 | subcontrol-origin: margin;
470 | }
471 |
472 | QScrollBar::add-line:vertical
473 | {
474 | margin: 0.3ex 0ex 0.3ex 0ex;
475 | border-image: url(:/dark/down_arrow_disabled.svg);
476 | height: 1ex;
477 | width: 1ex;
478 | subcontrol-position: bottom;
479 | subcontrol-origin: margin;
480 | }
481 |
482 | QScrollBar::sub-line:vertical:hover,
483 | QScrollBar::sub-line:vertical:on
484 | {
485 |
486 | border-image: url(:/dark/up_arrow.svg);
487 | height: 1ex;
488 | width: 1ex;
489 | subcontrol-position: top;
490 | subcontrol-origin: margin;
491 | }
492 |
493 |
494 | QScrollBar::add-line:vertical:hover,
495 | QScrollBar::add-line:vertical:on
496 | {
497 | border-image: url(:/dark/down_arrow.svg);
498 | height: 1ex;
499 | width: 1ex;
500 | subcontrol-position: bottom;
501 | subcontrol-origin: margin;
502 | }
503 |
504 | QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical
505 | {
506 | background: none;
507 | }
508 |
509 |
510 | QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
511 | {
512 | background: none;
513 | }
514 |
515 | QTextEdit
516 | {
517 | background-color: #232629;
518 | color: #eff0f1;
519 | border: 0.1ex solid #76797c;
520 | }
521 |
522 | QPlainTextEdit
523 | {
524 | background-color: #232629;;
525 | color: #eff0f1;
526 | border-radius: 0.2ex;
527 | border: 0.1ex solid #76797c;
528 | }
529 |
530 | QSizeGrip
531 | {
532 | border-image: url(:/dark/sizegrip.svg);
533 | width: 1.2ex;
534 | height: 1.2ex;
535 | }
536 |
537 | QMainWindow::separator
538 | {
539 | background-color: #31363b;
540 | color: white;
541 | padding-left: 0.4ex;
542 | spacing: 0.2ex;
543 | border: 0.1ex dashed #76797c;
544 | }
545 |
546 | QMainWindow::separator:hover
547 | {
548 |
549 | background-color: #787876;
550 | color: white;
551 | padding-left: 0.4ex;
552 | border: 0.1ex solid #76797c;
553 | spacing: 0.2ex;
554 | }
555 |
556 | QMenu::separator
557 | {
558 | height: 0.1ex;
559 | background-color: #76797c;
560 | color: white;
561 | padding-left: 0.4ex;
562 | margin-left: 1ex;
563 | margin-right: 0.5ex;
564 | }
565 |
566 | QFrame[frameShape="2"], /* QFrame::Panel == 0x0003 */
567 | QFrame[frameShape="3"], /* QFrame::WinPanel == 0x0003 */
568 | QFrame[frameShape="4"], /* QFrame::HLine == 0x0004 */
569 | QFrame[frameShape="5"], /* QFrame::VLine == 0x0005 */
570 | QFrame[frameShape="6"] /* QFrame::StyledPanel == 0x0006 */
571 | {
572 | border-width: 0.1ex;
573 | padding: 0.1ex;
574 | border-style: solid;
575 | border-color: #31363b;
576 | background-color: #76797c;
577 | border-radius: 0.5ex;
578 | }
579 |
580 | QStackedWidget
581 | {
582 | border: 0.1ex transparent black;
583 | }
584 |
585 | QToolBar
586 | {
587 | border: 0.1ex transparent #393838;
588 | background: 0.1ex solid #31363b;
589 | font-weight: bold;
590 | }
591 |
592 | QToolBar::handle:horizontal
593 | {
594 | border-image: url(:/dark/hmovetoolbar.svg);
595 | width = 1.6ex;
596 | height = 6.4ex;
597 | }
598 |
599 | QToolBar::handle:vertical
600 | {
601 | border-image: url(:/dark/vmovetoolbar.svg);
602 | width = 5.4ex;
603 | height = 1ex;
604 | }
605 |
606 | QToolBar::separator:horizontal
607 | {
608 | border-image: url(:/dark/hsepartoolbar.svg);
609 | width = 0.7ex;
610 | height = 6.3ex;
611 | }
612 |
613 | QToolBar::separator:vertical
614 | {
615 | border-image: url(:/dark/vsepartoolbars.svg);
616 | width = 6.3ex;
617 | height = 0.7ex;
618 | }
619 |
620 | QPushButton
621 | {
622 | color: #eff0f1;
623 | background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(38,106,133,75%));
624 |
625 | /*background-color: qlineargradient(x1: 0.5, y1: 0.5 x2: 0.5, y2: 1, stop: 0 #3b4045, stop: 0.5 #31363b);*/
626 | border-width: 0.1ex;
627 | border-color: #76797c;
628 | border-style: solid;
629 | padding: 0.5ex;
630 | border-radius: 0.2ex;
631 | outline: none;
632 | }
633 |
634 | QPushButton:disabled
635 | {
636 | background-color: #31363b;
637 | border-width: 0.1ex;
638 | border-color: #454545;
639 | border-style: solid;
640 | padding-top: 0.5ex;
641 | padding-bottom: 0.5ex;
642 | padding-left: 1ex;
643 | padding-right: 1ex;
644 | border-radius: 0.2ex;
645 | color: #454545;
646 | }
647 |
648 | QPushButton:focus
649 | {
650 | color: white;
651 | }
652 |
653 | QPushButton:pressed
654 | {
655 | background-color: #31363b;
656 | padding-top: -1.5ex;
657 | padding-bottom: -1.7ex;
658 | }
659 |
660 | QComboBox
661 | {
662 | selection-background-color: #3daee9;
663 | border-style: solid;
664 | border: 0.1ex solid #76797c;
665 | border-radius: 0.2ex;
666 | padding: 0.5ex;
667 | min-width: 7.5ex;
668 | padding-right:1ex;
669 | }
670 |
671 | QPushButton:checked
672 | {
673 | background-color: #76797c;
674 | border-color: #6A6969;
675 | }
676 |
677 | QPushButton:hover
678 | {
679 | background-color: qlineargradient(x1: 0.5, y1: 0.5 x2: 0.5, y2: 1, stop: 0 #454a4f, stop: 0.5 #3b4045);
680 | /*border: 0.1ex solid #3daee9;*/
681 | color: #eff0f1;
682 | }
683 |
684 | QPushButton:checked:hover
685 | {
686 | background-color: qlineargradient(x1: 0.5, y1: 0.5 x2: 0.5, y2: 1, stop: 0 #808386, stop: 0.5 #76797c);
687 | /*border: 0.1ex solid #3daee9;*/
688 | color: #eff0f1;
689 | }
690 |
691 | QComboBox:hover,
692 | QAbstractSpinBox:hover,
693 | QLineEdit:hover,
694 | QTextEdit:hover,
695 | QPlainTextEdit:hover,
696 | QAbstractView:hover,
697 | QTreeView:hover
698 | {
699 | /*border: 0.1ex solid #3daee9;*/
700 | color: #eff0f1;
701 | }
702 |
703 | QComboBox:hover:pressed,
704 | QPushButton:hover:pressed,
705 | QAbstractSpinBox:hover:pressed,
706 | QLineEdit:hover:pressed,
707 | QTextEdit:hover:pressed,
708 | QPlainTextEdit:hover:pressed,
709 | QAbstractView:hover:pressed,
710 | QTreeView:hover:pressed
711 | {
712 | background-color: #31363b;
713 | }
714 |
715 | QComboBox:on
716 | {
717 | padding-top: 0.3ex;
718 | padding-left: 0.4ex;
719 | selection-background-color: #4a4a4a;
720 | }
721 |
722 | QComboBox QAbstractItemView
723 | {
724 | background-color: #232629;
725 | border-radius: 0.2ex;
726 | border: 0.1ex solid #76797c;
727 | selection-background-color: #3daee9;
728 | padding-right:0.1em;
729 | padding-left:0.1em;
730 | }
731 |
732 | QComboBox::drop-down
733 | {
734 | subcontrol-origin: padding;
735 | subcontrol-position: top right;
736 | width: 1.5ex;
737 |
738 | border-left-width: 0ex;
739 | border-left-color: darkgray;
740 | border-left-style: solid;
741 | border-top-right-radius: 0.3ex;
742 | border-bottom-right-radius: 0.3ex;
743 | }
744 |
745 | QComboBox::down-arrow
746 | {
747 | border-image: url(:/dark/down_arrow_disabled.svg);
748 | width: 0.9ex;
749 | height: 0.6ex;
750 | }
751 |
752 | QComboBox::down-arrow:on,
753 | QComboBox::down-arrow:hover,
754 | QComboBox::down-arrow:focus
755 | {
756 | border-image: url(:/dark/down_arrow.svg);
757 | width: 0.9ex;
758 | height: 0.6ex;
759 | }
760 |
761 | QAbstractSpinBox
762 | {
763 | padding: 0.4ex;
764 | border: 0.1ex solid #76797c;
765 | background-color: #232629;
766 | color: #eff0f1;
767 | border-radius: 0.2ex;
768 | min-width: 7.5ex;
769 | }
770 |
771 | QAbstractSpinBox:up-button
772 | {
773 | background-color: transparent;
774 | subcontrol-origin: border;
775 | subcontrol-position: center right;
776 | }
777 |
778 | QAbstractSpinBox:down-button
779 | {
780 | background-color: transparent;
781 | subcontrol-origin: border;
782 | subcontrol-position: center left;
783 | }
784 |
785 | QAbstractSpinBox::up-arrow,
786 | QAbstractSpinBox::up-arrow:disabled,
787 | QAbstractSpinBox::up-arrow:off
788 | {
789 | border-image: url(:/dark/up_arrow_disabled.svg);
790 | width: 0.9ex;
791 | height: 0.6ex;
792 | }
793 |
794 | QAbstractSpinBox::up-arrow:hover
795 | {
796 | border-image: url(:/dark/up_arrow.svg);
797 | width: 0.9ex;
798 | height: 0.6ex;
799 | }
800 |
801 | QAbstractSpinBox::down-arrow,
802 | QAbstractSpinBox::down-arrow:disabled,
803 | QAbstractSpinBox::down-arrow:off
804 | {
805 | border-image: url(:/dark/down_arrow_disabled.svg);
806 | width: 0.9ex;
807 | height: 0.6ex;
808 | }
809 |
810 | QAbstractSpinBox::down-arrow:hover
811 | {
812 | border-image: url(:/dark/down_arrow.svg);
813 | width: 0.9ex;
814 | height: 0.6ex;
815 | }
816 |
817 | QLabel
818 | {
819 | border: 0ex solid black;
820 | }
821 |
822 | /* BORDERS */
823 | QTabWidget::pane
824 | {
825 | padding: 0.5ex;
826 | margin: 0.1ex;
827 | }
828 |
829 | QTabWidget::pane:top
830 | {
831 | border: 0.1ex solid #76797c;
832 | top: -0.1ex;
833 | }
834 |
835 | QTabWidget::pane:bottom
836 | {
837 | border: 0.1ex solid #76797c;
838 | bottom: -0.1ex;
839 | }
840 |
841 | QTabWidget::pane:left
842 | {
843 | border: 0.1ex solid #76797c;
844 | right: -0.1ex;
845 | }
846 |
847 | QTabWidget::pane:right
848 | {
849 | border: 0.1ex solid #76797c;
850 | left: -0.1ex;
851 | }
852 |
853 |
854 | QTabBar
855 | {
856 | qproperty-drawBase: 0;
857 | left: 0.5ex; /* move to the right by 0.5ex */
858 | border-radius: 0.3ex;
859 | }
860 |
861 | QTabBar:focus
862 | {
863 | border: 0ex transparent black;
864 | }
865 |
866 | QTabBar::close-button
867 | {
868 | border-image: url(:/dark/close.svg);
869 | background: transparent;
870 | }
871 |
872 | QTabBar::close-button:hover
873 | {
874 | border-image: url(:/dark/close-hover.svg);
875 | width: 1.2ex;
876 | height: 1.2ex;
877 | background: transparent;
878 | }
879 |
880 | QTabBar::close-button:pressed
881 | {
882 | border-image: url(:/dark/close-pressed.svg);
883 | width: 1.2ex;
884 | height: 1.2ex;
885 | background: transparent;
886 | }
887 |
888 | /* TOP TABS */
889 | QTabBar::tab:top
890 | {
891 | color: #eff0f1;
892 | border: 0.1ex transparent black;
893 | border-left: 0.1ex solid #76797c;
894 | border-top: 0.1ex solid #76797c;
895 | background-color: #31363b;
896 | padding: 0.5ex;
897 | min-width: 50px;
898 | border-top-left-radius: 0.2ex;
899 | border-top-right-radius: 0.2ex;
900 | }
901 |
902 | QTabBar::tab:top:last,
903 | QTabBar::tab:top:only-one
904 | {
905 | color: #eff0f1;
906 | border: 0.1ex transparent black;
907 | border-left: 0.1ex solid #76797c;
908 | border-right: 0.1ex solid #76797c;
909 | border-top: 0.1ex solid #76797c;
910 | background-color: #31363b;
911 | padding: 0.5ex;
912 | min-width: 50px;
913 | border-top-left-radius: 0.2ex;
914 | border-top-right-radius: 0.2ex;
915 | }
916 |
917 | QTabBar::tab:top:!selected
918 | {
919 | color: #eff0f1;
920 | background-color: #54575B;
921 | border: 0.1ex transparent black;
922 | border-left: 0.1ex solid #76797c;
923 | border-top-left-radius: 0.2ex;
924 | border-top-right-radius: 0.2ex;
925 | }
926 |
927 | QTabBar::tab:top:first:!selected
928 | {
929 | color: #eff0f1;
930 | background-color: #54575B;
931 | border: 0.1ex transparent black;
932 | border-top-left-radius: 0.2ex;
933 | border-top-right-radius: 0.2ex;
934 | }
935 |
936 | QTabBar::tab:top:!selected:hover
937 | {
938 | background-color: rgba(61, 173, 232, 0.2);
939 | border: 0.1ex rgba(61, 173, 232, 0.2);
940 | border-left: 0.1ex solid #76797c;
941 | }
942 |
943 | QTabBar::tab:top:!selected:first:hover
944 | {
945 | background-color: rgba(61, 173, 232, 0.2);
946 | border: 0.1ex rgba(61, 173, 232, 0.2);
947 | }
948 |
949 | /* BOTTOM TABS */
950 |
951 | QTabBar::tab:bottom
952 | {
953 | color: #eff0f1;
954 | border: 0.1ex transparent black;
955 | border-left: 0.1ex solid #76797c;
956 | border-bottom: 0.1ex solid #76797c;
957 | background-color: #31363b;
958 | padding: 0.5ex;
959 | border-bottom-left-radius: 0.2ex;
960 | border-bottom-right-radius: 0.2ex;
961 | min-width: 50px;
962 | }
963 |
964 | QTabBar::tab:bottom:last,
965 | QTabBar::tab:bottom:only-one
966 | {
967 | color: #eff0f1;
968 | border: 0.1ex transparent black;
969 | border-left: 0.1ex solid #76797c;
970 | border-right: 0.1ex solid #76797c;
971 | border-bottom: 0.1ex solid #76797c;
972 | background-color: #31363b;
973 | padding: 0.5ex;
974 | border-bottom-left-radius: 0.2ex;
975 | border-bottom-right-radius: 0.2ex;
976 | min-width: 50px;
977 | }
978 |
979 | QTabBar::tab:bottom:!selected
980 | {
981 | color: #eff0f1;
982 | background-color: #54575B;
983 | border: 0.1ex transparent black;
984 | border-left: 0.1ex solid #76797c;
985 | border-bottom-left-radius: 0.2ex;
986 | border-bottom-right-radius: 0.2ex;
987 | }
988 |
989 | QTabBar::tab:bottom:first:!selected
990 | {
991 | color: #eff0f1;
992 | background-color: #54575B;
993 | border: 0.1ex transparent black;
994 | border-top-left-radius: 0.2ex;
995 | border-top-right-radius: 0.2ex;
996 | }
997 |
998 | QTabBar::tab:bottom:!selected:hover
999 | {
1000 | background-color: rgba(61, 173, 232, 0.2);
1001 | border: 0.1ex rgba(61, 173, 232, 0.2);
1002 | border-left: 0.1ex solid #76797c;
1003 | }
1004 |
1005 | QTabBar::tab:bottom:!selected:first:hover
1006 | {
1007 | background-color: rgba(61, 173, 232, 0.2);
1008 | border: 0.1ex rgba(61, 173, 232, 0.2);
1009 | }
1010 |
1011 | /* LEFT TABS */
1012 | QTabBar::tab:left
1013 | {
1014 | color: #eff0f1;
1015 | border: 0.1ex transparent black;
1016 | border-top: 0.1ex solid #76797c;
1017 | border-right: 0.1ex solid #76797c;
1018 | background-color: #31363b;
1019 | padding: 0.5ex;
1020 | border-top-right-radius: 0.2ex;
1021 | border-bottom-right-radius: 0.2ex;
1022 | min-height: 50px;
1023 | }
1024 |
1025 | QTabBar::tab:left:last,
1026 | QTabBar::tab:left:only-one
1027 | {
1028 | color: #eff0f1;
1029 | border: 0.1ex transparent black;
1030 | border-top: 0.1ex solid #76797c;
1031 | border-bottom: 0.1ex solid #76797c;
1032 | border-right: 0.1ex solid #76797c;
1033 | background-color: #31363b;
1034 | padding: 0.5ex;
1035 | border-top-right-radius: 0.2ex;
1036 | border-bottom-right-radius: 0.2ex;
1037 | min-height: 50px;
1038 | }
1039 |
1040 | QTabBar::tab:left:!selected
1041 | {
1042 | color: #eff0f1;
1043 | background-color: #54575B;
1044 | border: 0.1ex transparent black;
1045 | border-top: 0.1ex solid #76797c;
1046 | border-top-right-radius: 0.2ex;
1047 | border-bottom-right-radius: 0.2ex;
1048 | }
1049 |
1050 | QTabBar::tab:left:!selected:hover
1051 | {
1052 | background-color: rgba(61, 173, 232, 0.2);
1053 | border: 0.1ex rgba(61, 173, 232, 0.2);
1054 | border-top: 0.1ex solid #76797c;
1055 | }
1056 |
1057 | QTabBar::tab:left:!selected:first:hover
1058 | {
1059 | background-color: rgba(61, 173, 232, 0.2);
1060 | border: 0.1ex rgba(61, 173, 232, 0.2);
1061 | }
1062 |
1063 | /* RIGHT TABS */
1064 | QTabBar::tab:right
1065 | {
1066 | color: #eff0f1;
1067 | border: 0.1ex transparent black;
1068 | border-top: 0.1ex solid #76797c;
1069 | border-left: 0.1ex solid #76797c;
1070 | background-color: #31363b;
1071 | padding: 0.5ex;
1072 | border-top-left-radius: 0.2ex;
1073 | border-bottom-left-radius: 0.2ex;
1074 | min-height: 50px;
1075 | }
1076 |
1077 | QTabBar::tab:right:last,
1078 | QTabBar::tab:right:only-one
1079 | {
1080 | color: #eff0f1;
1081 | border: 0.1ex transparent black;
1082 | border-top: 0.1ex solid #76797c;
1083 | border-bottom: 0.1ex solid #76797c;
1084 | border-left: 0.1ex solid #76797c;
1085 | background-color: #31363b;
1086 | padding: 0.5ex;
1087 | border-top-left-radius: 0.2ex;
1088 | border-bottom-left-radius: 0.2ex;
1089 | min-height: 50px;
1090 | }
1091 |
1092 | QTabBar::tab:right:!selected
1093 | {
1094 | color: #eff0f1;
1095 | background-color: #54575B;
1096 | border: 0.1ex transparent black;
1097 | border-top: 0.1ex solid #76797c;
1098 | border-top-left-radius: 0.2ex;
1099 | border-bottom-left-radius: 0.2ex;
1100 | }
1101 |
1102 | QTabBar::tab:right:!selected:hover
1103 | {
1104 | background-color: rgba(61, 173, 232, 0.2);
1105 | border: 0.1ex rgba(61, 173, 232, 0.2);
1106 | border-top: 0.1ex solid #76797c;
1107 | }
1108 |
1109 | QTabBar::tab:right:!selected:first:hover
1110 | {
1111 | background-color: rgba(61, 173, 232, 0.2);
1112 | border: 0.1ex rgba(61, 173, 232, 0.2);
1113 | }
1114 |
1115 | QTabBar QToolButton::right-arrow:enabled
1116 | {
1117 | border-image: url(:/dark/right_arrow.svg);
1118 | }
1119 |
1120 | QTabBar QToolButton::left-arrow:enabled
1121 | {
1122 | border-image: url(:/dark/left_arrow.svg);
1123 | }
1124 |
1125 | QTabBar QToolButton::right-arrow:disabled
1126 | {
1127 | border-image: url(:/dark/right_arrow_disabled.svg);
1128 | }
1129 |
1130 | QTabBar QToolButton::left-arrow:disabled
1131 | {
1132 | border-image: url(:/dark/left_arrow_disabled.svg);
1133 | }
1134 |
1135 | QDockWidget
1136 | {
1137 | background: #31363b;
1138 | border: 0.1ex solid #403F3F;
1139 | titlebar-close-icon: url(:/dark/transparent.svg);
1140 | titlebar-normal-icon: url(:/dark/transparent.svg);
1141 | }
1142 |
1143 | QDockWidget::close-button,
1144 | QDockWidget::float-button
1145 | {
1146 | border: 0.1ex solid transparent;
1147 | border-radius: 0.2ex;
1148 | background: transparent;
1149 | }
1150 |
1151 | QDockWidget::float-button
1152 | {
1153 | border-image: url(:/dark/undock.svg);
1154 | }
1155 |
1156 | QDockWidget::float-button:hover
1157 | {
1158 | border-image: url(:/dark/undock-hover.svg) ;
1159 | }
1160 |
1161 | QDockWidget::close-button
1162 | {
1163 | border-image: url(:/dark/close.svg) ;
1164 | }
1165 |
1166 | QDockWidget::close-button:hover
1167 | {
1168 | border-image: url(:/dark/close-hover.svg) ;
1169 | }
1170 |
1171 | QDockWidget::close-button:pressed
1172 | {
1173 | border-image: url(:/dark/close-pressed.svg) ;
1174 | }
1175 |
1176 | QTreeView,
1177 | QListView
1178 | {
1179 | border: 0.1ex solid #76797c;
1180 | background-color: #232629;
1181 | }
1182 |
1183 | QTreeView::branch:has-siblings:!adjoins-item
1184 | {
1185 | border-image: url(:/dark/stylesheet-vline.svg) 0;
1186 | }
1187 |
1188 | QTreeView::branch:has-siblings:adjoins-item
1189 | {
1190 | border-image: url(:/dark/stylesheet-branch-more.svg) 0;
1191 | }
1192 |
1193 | QTreeView::branch:!has-children:!has-siblings:adjoins-item
1194 | {
1195 | border-image: url(:/dark/stylesheet-branch-end.svg) 0;
1196 | }
1197 |
1198 | QTreeView::branch:has-children:!has-siblings:closed,
1199 | QTreeView::branch:closed:has-children:has-siblings
1200 | {
1201 | border-image: url(:/dark/branch-closed.svg);
1202 | }
1203 |
1204 | QTreeView::branch:open:has-children:!has-siblings,
1205 | QTreeView::branch:open:has-children:has-siblings
1206 | {
1207 | border-image: url(:/dark/branch-open.svg);
1208 | }
1209 |
1210 | QTableView::item,
1211 | QListView::item,
1212 | QTreeView::item
1213 | {
1214 | padding: 0.3ex;
1215 | }
1216 |
1217 | QTableView::item:!selected:hover,
1218 | QListView::item:!selected:hover,
1219 | QTreeView::item:!selected:hover
1220 | {
1221 | background-color: rgba(61, 173, 232, 0.2);
1222 | outline: 0;
1223 | color: #eff0f1;
1224 | padding: 0.3ex;
1225 | }
1226 |
1227 | QSlider::groove:horizontal
1228 | {
1229 | border: 0.1ex solid #31363b;
1230 | height: 0.4ex;
1231 | background: #565a5e;
1232 | margin: 0ex;
1233 | border-radius: 0.2ex;
1234 | }
1235 |
1236 | QSlider::handle:horizontal
1237 | {
1238 | background: #232629;
1239 | border: 0.1ex solid #626568;
1240 | width: 1.6ex;
1241 | height: 1.6ex;
1242 | margin: -0.8ex 0;
1243 | border-radius: 0.9ex;
1244 | }
1245 |
1246 | QSlider::groove:vertical
1247 | {
1248 | border: 0.1ex solid #31363b;
1249 | width: 0.4ex;
1250 | background: #565a5e;
1251 | margin: 0ex;
1252 | border-radius: 0.3ex;
1253 | }
1254 |
1255 | QSlider::handle:vertical
1256 | {
1257 | background: #232629;
1258 | border: 0.1ex solid #626568;
1259 | width: 1.6ex;
1260 | height: 1.6ex;
1261 | margin: 0 -0.8ex;
1262 | border-radius: 0.9ex;
1263 | }
1264 |
1265 | QSlider::handle:horizontal:hover,
1266 | QSlider::handle:horizontal:focus,
1267 | QSlider::handle:vertical:hover,
1268 | QSlider::handle:vertical:focus
1269 | {
1270 | border: 0.1ex solid #3daee9;
1271 | }
1272 |
1273 | QSlider::sub-page:horizontal,
1274 | QSlider::add-page:vertical
1275 | {
1276 | background: #3daee9;
1277 | border-radius: 0.3ex;
1278 | }
1279 |
1280 | QSlider::add-page:horizontal,
1281 | QSlider::sub-page:vertical
1282 | {
1283 | background: #626568;
1284 | border-radius: 0.3ex;
1285 | }
1286 |
1287 | QToolButton
1288 | {
1289 | background-color: transparent;
1290 | border: 0.1ex solid #76797c;
1291 | border-radius: 0.2ex;
1292 | margin: 0.3ex;
1293 | padding: 0.5ex;
1294 | padding-right:2ex;
1295 | }
1296 |
1297 | QToolButton[popupMode="1"] /* only for MenuButtonPopup */
1298 | {
1299 | padding-right: 2ex; /* make way for the popup button */
1300 | }
1301 |
1302 | QToolButton[popupMode="2"] /* only for InstantPopup */
1303 | {
1304 | padding-right: 1ex; /* make way for the popup button */
1305 | }
1306 |
1307 | QToolButton::menu-indicator
1308 | {
1309 |
1310 | border-image: url(:/dark/down_arrow.svg);
1311 | top: -0.7ex; left: -0.2ex; /* shift it a bit */
1312 | width = 0.9ex;
1313 | height = 0.6ex;
1314 |
1315 | }
1316 |
1317 | QToolButton::menu-arrow
1318 | {
1319 | border-image: url(:/dark/down_arrow.svg);
1320 | width = 0.9ex;
1321 | height = 0.6ex;
1322 |
1323 | }
1324 |
1325 | QToolButton:hover,
1326 | QToolButton::menu-button:hover
1327 | {
1328 | background-color: transparent;
1329 | border: 0.1ex solid #3daee9;
1330 | }
1331 |
1332 | QToolButton:checked,
1333 | QToolButton:pressed,
1334 | QToolButton::menu-button:pressed
1335 | {
1336 | background-color: #3daee9;
1337 | border: 0.1ex solid #3daee9;
1338 | padding: 0.5ex;
1339 | }
1340 |
1341 | QToolButton::menu-button
1342 | {
1343 | border: 0.1ex solid #76797c;
1344 | border-top-right-radius: 6px;
1345 | border-bottom-right-radius: 6px;
1346 | /* 1ex width + 0.4ex for border + no text = 2ex allocated above */
1347 | width: 1ex;
1348 | padding: 0.5ex;
1349 | outline: none;
1350 | }
1351 |
1352 | QToolButton::menu-arrow:open
1353 | {
1354 | border: 0.1ex solid #76797c;
1355 | }
1356 |
1357 | QPushButton::menu-indicator
1358 | {
1359 | subcontrol-origin: padding;
1360 | subcontrol-position: bottom right;
1361 | left: 0.8ex;
1362 | }
1363 |
1364 | QTableView
1365 | {
1366 | border: 0.1ex solid #76797c;
1367 | gridline-color: #31363b;
1368 | background-color: #232629;
1369 | }
1370 |
1371 |
1372 | QTableView,
1373 | QHeaderView
1374 | {
1375 | border-radius: 0px;
1376 | }
1377 |
1378 | QTableView::item:pressed,
1379 | QListView::item:pressed,
1380 | QTreeView::item:pressed
1381 | {
1382 | background: #3daee9;
1383 | color: #eff0f1;
1384 | }
1385 |
1386 | QTableView::item:selected:active,
1387 | QTreeView::item:selected:active,
1388 | QListView::item:selected:active
1389 | {
1390 | background: #3daee9;
1391 | color: #eff0f1;
1392 | }
1393 |
1394 | QListView::item:selected:hover,
1395 | QTreeView::item:selected:hover
1396 | {
1397 | background-color: #47b8f3;
1398 | color: #eff0f1;
1399 | }
1400 |
1401 | QHeaderView
1402 | {
1403 | background-color: #31363b;
1404 | border: 0.1ex transparent;
1405 | border-radius: 0px;
1406 | margin: 0px;
1407 | padding: 0px;
1408 |
1409 | }
1410 |
1411 | QHeaderView::section
1412 | {
1413 | background-color: #31363b;
1414 | color: #eff0f1;
1415 | padding: 0.5ex;
1416 | border: 0.1ex solid #76797c;
1417 | border-top: 0ex;
1418 | border-left:0ex;
1419 | border-right:0.1ex solid #76797c;
1420 | border-radius: 0px;
1421 | text-align: center;
1422 | }
1423 |
1424 |
1425 | QHeaderView::section::vertical::first,
1426 | QHeaderView::section::vertical::only-one
1427 | {
1428 | border-top: 0.1ex solid #76797c;
1429 | border-left:0ex;
1430 | }
1431 |
1432 | QHeaderView::section::vertical
1433 | {
1434 | border-top: transparent;
1435 | }
1436 |
1437 | QHeaderView::section::horizontal::first,
1438 | QHeaderView::section::horizontal::only-one
1439 | {
1440 | border-left: 0.1ex solid #76797c;
1441 | }
1442 |
1443 | QHeaderView::section::horizontal
1444 | {
1445 | border-left: transparent;
1446 | }
1447 |
1448 |
1449 | QHeaderView::section:checked
1450 | {
1451 | color: white;
1452 | background-color: #334e5e;
1453 | }
1454 |
1455 | /* style the sort indicator */
1456 | QHeaderView::down-arrow
1457 | {
1458 | image: url(:/dark/down_arrow.svg);
1459 | }
1460 |
1461 | QHeaderView::up-arrow
1462 | {
1463 | image: url(:/dark/up_arrow.svg);
1464 | }
1465 |
1466 | QTableCornerButton::section
1467 | {
1468 | background-color: #31363b;
1469 | border: 0.1ex transparent #76797c;
1470 | border-radius: 0px;
1471 | }
1472 |
1473 | QToolBox
1474 | {
1475 | padding: 0.5ex;
1476 | border: 0.1ex transparent black;
1477 | }
1478 |
1479 | QToolBox:selected
1480 | {
1481 | background-color: #31363b;
1482 | border-color: #3daee9;
1483 | }
1484 |
1485 | QToolBox:hover
1486 | {
1487 | border-color: #3daee9;
1488 | }
1489 |
1490 | QStatusBar::item
1491 | {
1492 | border: 0px transparent dark;
1493 | }
1494 |
1495 | QFrame[height="3"],
1496 | QFrame[width="3"]
1497 | {
1498 | background-color: #76797c;
1499 | }
1500 |
1501 | QSplitter::handle
1502 | {
1503 | border: 0.1ex dashed #76797c;
1504 | }
1505 |
1506 | QSplitter::handle:hover
1507 | {
1508 | background-color: #787876;
1509 | border: 0.1ex solid #76797c;
1510 | }
1511 |
1512 | QSplitter::handle:horizontal
1513 | {
1514 | width: 0.1ex;
1515 | }
1516 |
1517 | QSplitter::handle:vertical
1518 | {
1519 | height: 0.1ex;
1520 | }
1521 |
1522 | QProgressBar:horizontal
1523 | {
1524 | background-color: #626568;
1525 | border: 0.1ex solid #31363b;
1526 | border-radius: 0.3ex;
1527 | height: 0.5ex;
1528 | text-align: right;
1529 | margin-top: 0.5ex;
1530 | margin-bottom: 0.5ex;
1531 | margin-right: 5ex;
1532 | padding: 0px;
1533 | }
1534 |
1535 | QProgressBar::chunk:horizontal
1536 | {
1537 | background-color: #3daee9;
1538 | border: 0.1ex transparent;
1539 | border-radius: 0.3ex;
1540 | }
1541 |
1542 | QSpinBox,
1543 | QDoubleSpinBox
1544 | {
1545 | padding-right: 0.4ex;
1546 | }
1547 |
1548 | QSpinBox::up-button,
1549 | QDoubleSpinBox::up-button
1550 | {
1551 | subcontrol-origin: content;
1552 | subcontrol-position: right top;
1553 |
1554 | width: 1.6ex;
1555 | border-width: 0.1ex;
1556 | }
1557 |
1558 | QSpinBox::up-arrow,
1559 | QDoubleSpinBox::up-arrow
1560 | {
1561 | border-image: url(:/dark/up_arrow.svg);
1562 | width: 0.9ex;
1563 | height: 0.6ex;
1564 | }
1565 |
1566 | QSpinBox::up-arrow:hover,
1567 | QSpinBox::up-arrow:pressed,
1568 | QDoubleSpinBox::up-arrow:hover,
1569 | QDoubleSpinBox::up-arrow:pressed
1570 | {
1571 | border-image: url(:/dark/up_arrow-hover.svg);
1572 | width: 0.9ex;
1573 | height: 0.6ex;
1574 | }
1575 |
1576 | QSpinBox::up-arrow:disabled,
1577 | QSpinBox::up-arrow:off,
1578 | QDoubleSpinBox::up-arrow:disabled,
1579 | QDoubleSpinBox::up-arrow:off
1580 | {
1581 | border-image: url(:/dark/up_arrow_disabled.svg);
1582 | }
1583 |
1584 | QSpinBox::down-button,
1585 | QDoubleSpinBox::down-button
1586 | {
1587 | subcontrol-origin: content;
1588 | subcontrol-position: right bottom;
1589 |
1590 | width: 1.6ex;
1591 | border-width: 0.1ex;
1592 | }
1593 |
1594 | QSpinBox::down-arrow,
1595 | QDoubleSpinBox::down-arrow
1596 | {
1597 | border-image: url(:/dark/down_arrow.svg);
1598 | width: 0.9ex;
1599 | height: 0.6ex;
1600 | }
1601 |
1602 | QSpinBox::down-arrow:hover,
1603 | QSpinBox::down-arrow:pressed,
1604 | QDoubleSpinBox::down-arrow:hover,
1605 | QDoubleSpinBox::down-arrow:pressed
1606 | {
1607 | border-image: url(:/dark/down_arrow-hover.svg);
1608 | width: 0.9ex;
1609 | height: 0.6ex;
1610 | }
1611 |
1612 | QSpinBox::down-arrow:disabled,
1613 | QSpinBox::down-arrow:off,
1614 | QDoubleSpinBox::down-arrow:disabled,
1615 | QDoubleSpinBox::down-arrow:off
1616 | {
1617 | border-image: url(:/dark/down_arrow_disabled.svg);
1618 | }
1619 |
--------------------------------------------------------------------------------
/src/light.qss:
--------------------------------------------------------------------------------
1 | /*
2 | * Breeze stylesheet.
3 | *
4 | * :author: Colin Duquesnoy
5 | * :editor: Alex Huszagh
6 | * :license: MIT, see LICENSE.md
7 | *
8 | * This is originally a fork of QDarkStyleSheet, and is based on Breeze/
9 | * BreezeDark color scheme, but is in no way affiliated with KDE.
10 | *
11 | * ---------------------------------------------------------------------
12 | * The MIT License (MIT)
13 | *
14 | * Copyright (c) <2013-2014>
15 | * Copyright (c) <2015-2016>
16 | *
17 | * Permission is hereby granted, free of charge, to any person obtaining
18 | * a copy of this software and associated documentation files (the
19 | * "Software"), to deal in the Software without restriction, including
20 | * without limitation the rights to use, copy, modify, merge, publish,
21 | * distribute, sublicense, and/or sell copies of the Software, and to
22 | * permit persons to whom the Software is furnished to do so, subject to
23 | * the following conditions:
24 | *
25 | * The above copyright notice and this permission notice shall be included in
26 | * all copies or substantial portions of the Software.
27 | *
28 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
29 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 | * ---------------------------------------------------------------------
36 | */
37 |
38 | QToolTip
39 | {
40 | background-color: black;
41 | color: white;
42 | padding: 0.5ex;
43 | }
44 |
45 | QWidget
46 | {
47 | color: #31363B;
48 | background-color: #EFF0F1;
49 | selection-background-color:#33A4DF;
50 | selection-color: #31363B;
51 | background-clip: border;
52 | border-image: none;
53 | border: 0px transparent black;
54 | outline: 0;
55 | }
56 |
57 | QWidget:item:hover
58 | {
59 | background-color: #33A4DF;
60 | color: #31363B;
61 | }
62 |
63 | QWidget:item:selected
64 | {
65 | background-color: #33A4DF;
66 | }
67 |
68 |
69 | QCheckBox
70 | {
71 | spacing: 0.5ex;
72 | outline: none;
73 | color: #31363B;
74 | margin-bottom: 0.2ex;
75 | opacity: 200;
76 | }
77 |
78 | QCheckBox:disabled
79 | {
80 | color: #BAB9B8;
81 | }
82 |
83 | QGroupBox::indicator
84 | {
85 | margin-left: 0.2ex;
86 | margin-left: 0.2ex;
87 | }
88 |
89 | QCheckBox::indicator:unchecked,
90 | QCheckBox::indicator:unchecked:focus
91 | {
92 | border-image: url(:/light/checkbox_unchecked_disabled.svg);
93 | }
94 |
95 | QCheckBox::indicator:unchecked:hover,
96 | QCheckBox::indicator:unchecked:pressed,
97 | QGroupBox::indicator:unchecked:hover,
98 | QGroupBox::indicator:unchecked:focus,
99 | QGroupBox::indicator:unchecked:pressed
100 | {
101 | border: none;
102 | border-image: url(:/light/checkbox_unchecked-hover.svg);
103 | }
104 |
105 | QCheckBox::indicator:checked
106 | {
107 | border-image: url(:/light/checkbox_checked.svg);
108 | }
109 |
110 | QCheckBox::indicator:checked:focus,
111 | QCheckBox::indicator:checked:pressed,
112 | QGroupBox::indicator:checked:focus,
113 | QGroupBox::indicator:checked:pressed
114 | {
115 | border: none;
116 | border-image: url(:/light/checkbox_checked.svg);
117 | }
118 |
119 | QCheckBox::indicator:checked:hover,
120 | QGroupBox::indicator:checked:hover
121 | {
122 | border-image: url(:/light/checkbox_checked-hover.svg);
123 | }
124 |
125 | QCheckBox::indicator:indeterminate
126 | {
127 | border-image: url(:/light/checkbox_indeterminate.svg);
128 | }
129 |
130 | QCheckBox::indicator:indeterminate:hover
131 | {
132 | border-image: url(:/light/checkbox_indeterminate-hover.svg);
133 | }
134 |
135 | QCheckBox::indicator:indeterminate:focus,
136 | QCheckBox::indicator:indeterminate:pressed
137 | {
138 | }
139 |
140 | QCheckBox::indicator:indeterminate:disabled
141 | {
142 | border-image: url(:/light/checkbox_indeterminate_disabled.svg);
143 | }
144 |
145 | QCheckBox::indicator:checked:disabled,
146 | QGroupBox::indicator:checked:disabled
147 | {
148 | border-image: url(:/light/checkbox_checked_disabled.svg);
149 | }
150 |
151 | QCheckBox::indicator:unchecked:disabled,
152 | QGroupBox::indicator:unchecked:disabled
153 | {
154 | border-image: url(:/light/checkbox_unchecked_disabled.svg);
155 | }
156 |
157 | QRadioButton
158 | {
159 | spacing: 0.5ex;
160 | outline: none;
161 | color: #31363B;
162 | margin-bottom: 0.2ex;
163 | }
164 |
165 | QRadioButton:disabled
166 | {
167 | color: #BAB9B8;
168 | }
169 |
170 | QRadioButton::indicator:unchecked,
171 | QRadioButton::indicator:unchecked:focus
172 | {
173 | border-image: url(:/light/radio_unchecked_disabled.svg);
174 | }
175 |
176 | QRadioButton::indicator:unchecked:hover,
177 | QRadioButton::indicator:unchecked:pressed
178 | {
179 | border: none;
180 | outline: none;
181 | border-image: url(:/light/radio_unchecked-hover.svg);
182 | }
183 |
184 | QRadioButton::indicator:checked
185 | {
186 | border: none;
187 | outline: none;
188 | border-image: url(:/light/radio_checked.svg);
189 | }
190 |
191 | QRadioButton::indicator:checked:focus,
192 | QRadioButton::indicator:checked:pressed
193 | {
194 | border: none;
195 | outline: none;
196 | border-image: url(:/light/radio_checked.svg);
197 | }
198 |
199 | QRadioButton::indicator:checked:hover
200 | {
201 | border-image: url(:/light/radio_checked-hover.svg);
202 | }
203 |
204 | QRadioButton::indicator:checked:disabled
205 | {
206 | outline: none;
207 | border-image: url(:/light/radio_checked_disabled.svg);
208 | }
209 |
210 | QRadioButton::indicator:unchecked:disabled
211 | {
212 | border-image: url(:/light/radio_unchecked_disabled.svg);
213 | }
214 |
215 | QMenuBar
216 | {
217 | background-color: #EFF0F1;
218 | color: #31363B;
219 | }
220 |
221 | QMenuBar::item
222 | {
223 | background: transparent;
224 | }
225 |
226 | QMenuBar::item:selected
227 | {
228 | background: transparent;
229 | border: 0.1ex solid #BAB9B8;
230 | }
231 |
232 | QMenuBar::item:pressed
233 | {
234 | border: 0.1ex solid #BAB9B8;
235 | background-color: #33A4DF;
236 | color: #31363B;
237 | margin-bottom: -0.1ex;
238 | padding-bottom: 0.1ex;
239 | }
240 |
241 | QMenu
242 | {
243 | border: 0.1ex solid #BAB9B8;
244 | color: #31363B;
245 | margin: 0.2ex;
246 | }
247 |
248 | QMenu::icon
249 | {
250 | margin: 0.5ex;
251 | }
252 |
253 | QMenu::item
254 | {
255 | padding: 0.5ex 3ex 0.5ex 3ex;
256 | margin-left: 0.5ex;
257 | border: 0.1ex solid transparent; /* reserve space for selection border */
258 | }
259 |
260 | QMenu::item:selected
261 | {
262 | color: #31363B;
263 | }
264 |
265 | QMenu::separator
266 | {
267 | height: 0.2ex;
268 | background: lightblue;
269 | margin-left: 1ex;
270 | margin-right: 0.5ex;
271 | }
272 |
273 | /* non-exclusive indicator = check box style indicator
274 | (see QActionGroup::setExclusive) */
275 | QMenu::indicator:non-exclusive:unchecked
276 | {
277 | border-image: url(:/light/checkbox_unchecked_disabled.svg);
278 | }
279 |
280 | QMenu::indicator:non-exclusive:unchecked:selected
281 | {
282 | border-image: url(:/light/checkbox_unchecked_disabled.svg);
283 | }
284 |
285 | QMenu::indicator:non-exclusive:checked
286 | {
287 | border-image: url(:/light/checkbox_checked.svg);
288 | }
289 |
290 | QMenu::indicator:non-exclusive:checked:selected
291 | {
292 | border-image: url(:/light/checkbox_checked.svg);
293 | }
294 |
295 | /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
296 | QMenu::indicator:exclusive:unchecked
297 | {
298 | border-image: url(:/light/radio_unchecked_disabled.svg);
299 | }
300 |
301 | QMenu::indicator:exclusive:unchecked:selected
302 | {
303 | border-image: url(:/light/radio_unchecked_disabled.svg);
304 | }
305 |
306 | QMenu::indicator:exclusive:checked
307 | {
308 | border-image: url(:/light/radio_checked.svg);
309 | }
310 |
311 | QMenu::indicator:exclusive:checked:selected
312 | {
313 | border-image: url(:/light/radio_checked.svg);
314 | }
315 |
316 | QMenu::right-arrow
317 | {
318 | margin: 0.5ex;
319 | border-image: url(:/light/right_arrow.svg);
320 | width: 0.6ex;
321 | height: 0.9ex;
322 | }
323 |
324 |
325 | QWidget:disabled
326 | {
327 | color: #454545;
328 | background-color: #EFF0F1;
329 | }
330 |
331 | QAbstractItemView
332 | {
333 | alternate-background-color: #EFF0F1;
334 | color: #31363B;
335 | border: 0.1ex solid 3A3939;
336 | border-radius: 0.2ex;
337 | }
338 |
339 |
340 | QTabWidget:focus,
341 | QCheckBox:focus,
342 | QRadioButton:focus,
343 | QSlider:focus
344 | {
345 | border: none;
346 | }
347 |
348 | QLineEdit
349 | {
350 | background-color: #FCFCFC;
351 | padding: 0.5ex;
352 | border-style: solid;
353 | border: 0.1ex solid #BAB9B8;
354 | border-radius: 0.2ex;
355 | color: #31363B;
356 | }
357 |
358 | QGroupBox
359 | {
360 | border: 0.1ex solid #BAB9B8;
361 | border-radius: 0.2ex;
362 | padding-top: 1ex;
363 | margin-top: 1ex;
364 | }
365 |
366 | QGroupBox::title
367 | {
368 | subcontrol-origin: margin;
369 | subcontrol-position: top center;
370 | padding-left: 0.1ex;
371 | padding-right: 0.1ex;
372 | margin-top: -0.7ex;
373 | }
374 |
375 | QAbstractScrollArea
376 | {
377 | border-radius: 0.2ex;
378 | border: 0.1ex solid #BAB9B8;
379 | background-color: transparent;
380 | }
381 |
382 | QScrollBar:horizontal
383 | {
384 | height: 1.5ex;
385 | margin: 0.3ex 1.5ex 0.3ex 1.5ex;
386 | border: 0.1ex transparent #B8BCC0;
387 | border-radius: 0.4ex;
388 | background-color: #B8BCC0;
389 | }
390 |
391 | QScrollBar::handle:horizontal
392 | {
393 | background-color: #3DAEE9;
394 | min-width: 0.5ex;
395 | border-radius: 0.4ex;
396 | }
397 |
398 | QScrollBar::add-line:horizontal
399 | {
400 | margin: 0ex 0.3ex 0ex 0.3ex;
401 | border-image: url(:/light/right_arrow_disabled.svg);
402 | width: 1ex;
403 | height: 1ex;
404 | subcontrol-position: right;
405 | subcontrol-origin: margin;
406 | }
407 |
408 | QScrollBar::sub-line:horizontal
409 | {
410 | margin: 0px 0.3ex 0px 0.3ex;
411 | border-image: url(:/light/left_arrow_disabled.svg);
412 | height: 1ex;
413 | width: 1ex;
414 | subcontrol-position: left;
415 | subcontrol-origin: margin;
416 | }
417 |
418 | QScrollBar::add-line:horizontal:hover,QScrollBar::add-line:horizontal:on
419 | {
420 | border-image: url(:/light/right_arrow.svg);
421 | width: 1ex;
422 | height: 1ex;
423 | subcontrol-position: right;
424 | subcontrol-origin: margin;
425 | }
426 |
427 |
428 | QScrollBar::sub-line:horizontal:hover, QScrollBar::sub-line:horizontal:on
429 | {
430 | border-image: url(:/light/left_arrow.svg);
431 | width: 1ex;
432 | height: 1ex;
433 | subcontrol-position: left;
434 | subcontrol-origin: margin;
435 | }
436 |
437 | QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal
438 | {
439 | background: none;
440 | }
441 |
442 |
443 | QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal
444 | {
445 | background: none;
446 | }
447 |
448 | QScrollBar:vertical
449 | {
450 | background-color: #B8BCC0;
451 | width: 1.5ex;
452 | margin: 1.5ex 0.3ex 1.5ex 0.3ex;
453 | border: 0.1ex transparent #B8BCC0;
454 | border-radius: 0.4ex;
455 | }
456 |
457 | QScrollBar::handle:vertical
458 | {
459 | background-color: #3DAEE9;
460 | min-height: 0.5ex;
461 | border-radius: 0.4ex;
462 | }
463 |
464 | QScrollBar::sub-line:vertical
465 | {
466 | margin: 0.3ex 0ex 0.3ex 0ex;
467 | border-image: url(:/light/up_arrow_disabled.svg);
468 | height: 1ex;
469 | width: 1ex;
470 | subcontrol-position: top;
471 | subcontrol-origin: margin;
472 | }
473 |
474 | QScrollBar::add-line:vertical
475 | {
476 | margin: 0.3ex 0ex 0.3ex 0ex;
477 | border-image: url(:/light/down_arrow_disabled.svg);
478 | height: 1ex;
479 | width: 1ex;
480 | subcontrol-position: bottom;
481 | subcontrol-origin: margin;
482 | }
483 |
484 | QScrollBar::sub-line:vertical:hover,
485 | QScrollBar::sub-line:vertical:on
486 | {
487 |
488 | border-image: url(:/light/up_arrow.svg);
489 | height: 1ex;
490 | width: 1ex;
491 | subcontrol-position: top;
492 | subcontrol-origin: margin;
493 | }
494 |
495 |
496 | QScrollBar::add-line:vertical:hover,
497 | QScrollBar::add-line:vertical:on
498 | {
499 | border-image: url(:/light/down_arrow.svg);
500 | height: 1ex;
501 | width: 1ex;
502 | subcontrol-position: bottom;
503 | subcontrol-origin: margin;
504 | }
505 |
506 | QScrollBar::up-arrow:vertical,
507 | QScrollBar::down-arrow:vertical
508 | {
509 | background: none;
510 | }
511 |
512 |
513 | QScrollBar::add-page:vertical,
514 | QScrollBar::sub-page:vertical
515 | {
516 | background: none;
517 | }
518 |
519 | QTextEdit
520 | {
521 | background-color: #EFF0F1;
522 | color: #31363B;
523 | border: 0.1ex solid #BAB9B8;
524 | }
525 |
526 | QPlainTextEdit
527 | {
528 | background-color: #EFF0F1;
529 | color: #31363B;
530 | border-radius: 0.2ex;
531 | border: 0.1ex solid #BAB9B8;
532 | }
533 |
534 | QSizeGrip
535 | {
536 | border-image: url(:/light/sizegrip.svg);
537 | width: 1.2ex;
538 | height: 1.2ex;
539 | }
540 |
541 | QMainWindow::separator
542 | {
543 | background-color: #EFF0F1;
544 | color: white;
545 | padding-left: 0.4ex;
546 | spacing: 0.2ex;
547 | border: 0.1ex dashed #BAB9B8;
548 | }
549 |
550 | QMainWindow::separator:hover
551 | {
552 |
553 | background-color: #787876;
554 | color: white;
555 | padding-left: 0.4ex;
556 | border: 0.1ex solid #BAB9B8;
557 | spacing: 0.2x;
558 | }
559 |
560 | QMenu::separator
561 | {
562 | height: 0.1ex;
563 | background-color: #BAB9B8;
564 | color: white;
565 | padding-left: 0.4ex;
566 | margin-left: 1ex;
567 | margin-right: 0.5ex;
568 | }
569 |
570 | QFrame[frameShape="2"], /* QFrame::Panel == 0x0003 */
571 | QFrame[frameShape="3"], /* QFrame::WinPanel == 0x0003 */
572 | QFrame[frameShape="4"], /* QFrame::HLine == 0x0004 */
573 | QFrame[frameShape="5"], /* QFrame::VLine == 0x0005 */
574 | QFrame[frameShape="6"] /* QFrame::StyledPanel == 0x0006 */
575 | {
576 | border-width: 0.1ex;
577 | padding: 0.1ex;
578 | border-style: solid;
579 | border-color: #EFF0F1;
580 | background-color: #bcbfc2;
581 | border-radius: 0.5ex;
582 | }
583 |
584 | QStackedWidget
585 | {
586 | border: 0.1ex transparent black;
587 | }
588 |
589 | QToolBar
590 | {
591 | border: 0.1ex transparent #393838;
592 | background: 0.1ex solid #EFF0F1;
593 | font-weight: bold;
594 | }
595 |
596 | QToolBar::handle:horizontal
597 | {
598 | border-image: url(:/light/hmovetoolbar.svg);
599 | width = 1.6ex;
600 | height = 6.4ex;
601 | }
602 |
603 | QToolBar::handle:vertical
604 | {
605 | border-image: url(:/light/vmovetoolbar.svg);
606 | width = 5.4ex;
607 | height = 1ex;
608 | }
609 |
610 | QToolBar::separator:horizontal
611 | {
612 | border-image: url(:/light/hsepartoolbar.svg);
613 | width = 0.7ex;
614 | height = 6.3ex;
615 | }
616 |
617 | QToolBar::separator:vertical
618 | {
619 | border-image: url(:/light/vsepartoolbars.svg);
620 | width = 6.3ex;
621 | height = 0.7ex;
622 | }
623 | QPushButton {
624 | color: #232627;
625 | background-color: #eff0f1;
626 | border-width: 1px;
627 | border-color: #76797C;
628 | border-style: solid;
629 | padding: 5px;
630 | border-radius: 2px;
631 | outline: none;
632 | }
633 |
634 | QPushButton:disabled {
635 | background-color: #d0d0d0;
636 | border-width: 1px;
637 | border-color: #b4b4b4;
638 | border-style: solid;
639 | padding-top: 5px;
640 | padding-bottom: 5px;
641 | padding-left: 10px;
642 | padding-right: 10px;
643 | border-radius: 2px;
644 | color: #bcbcbc;
645 | }
646 |
647 |
648 | QPushButton:pressed {
649 | padding-top: -15px;
650 | padding-bottom: -17px;
651 | }
652 |
653 | QComboBox {
654 | selection-background-color: #3daee9;
655 | border-style: solid;
656 | border: 1px solid #76797C;
657 | border-radius: 2px;
658 | padding: 5px;
659 | min-width: 75px;
660 | }
661 |
662 | QPushButton:checked {
663 | background-color: #76797C;
664 | border-color: #6A6969;
665 | }
666 |
667 | QComboBox:hover,
668 | QPushButton:hover,
669 | QAbstractSpinBox:hover,
670 | QLineEdit:hover,
671 | QTextEdit:hover,
672 | QPlainTextEdit:hover,
673 | QAbstractView:hover,
674 | QTreeView:hover {
675 | border: 1px solid #3daee9;
676 | color: #232627;
677 | }
678 |
679 | QComboBox:hover:pressed,
680 | QAbstractSpinBox:hover:pressed,
681 | QLineEdit:hover:pressed,
682 | QTextEdit:hover:pressed,
683 | QPlainTextEdit:hover:pressed,
684 | QAbstractView:hover:pressed,
685 | QTreeView:hover:pressed
686 | {
687 | background-color: #EFF0F1;
688 | }
689 |
690 | QComboBox:on
691 | {
692 | padding-top: 0.3ex;
693 | padding-left: 0.4ex;
694 | selection-background-color: #4a4a4a;
695 | }
696 |
697 | QComboBox QAbstractItemView
698 | {
699 | background-color: #FCFCFC;
700 | border-radius: 0.2ex;
701 | border: 0.1ex solid #BAB9B8;
702 | selection-background-color: #33A4DF;
703 | }
704 |
705 | QComboBox::drop-down
706 | {
707 | subcontrol-origin: padding;
708 | subcontrol-position: top right;
709 | width: 1.5ex;
710 |
711 | border-left-width: 0ex;
712 | border-left-color: darkgray;
713 | border-left-style: solid;
714 | border-top-right-radius: 0.3ex;
715 | border-bottom-right-radius: 0.3ex;
716 | }
717 |
718 | QComboBox::down-arrow
719 | {
720 | border-image: url(:/light/down_arrow_disabled.svg);
721 | width: 0.9ex;
722 | height: 0.6ex;
723 | }
724 |
725 | QComboBox::down-arrow:on,
726 | QComboBox::down-arrow:hover,
727 | QComboBox::down-arrow:focus
728 | {
729 | border-image: url(:/light/down_arrow.svg);
730 | width: 0.9ex;
731 | height: 0.6ex;
732 | }
733 |
734 | QSpinBox
735 | {
736 | padding: 0.4ex;
737 | border: 0.1ex solid #BAB9B8;
738 | background-color: #fcfcfc;
739 | color: #31363B;
740 | border-radius: 0.2ex;
741 | min-width: 7.5ex;
742 | }
743 |
744 | QAbstractSpinBox
745 | {
746 | padding: 0.4ex;
747 | border: 0.1ex solid #BAB9B8;
748 | background-color: #fcfcfc;
749 | color: #31363B;
750 | border-radius: 0.2ex;
751 | min-width: 7.5ex;
752 | }
753 |
754 | QAbstractSpinBox:up-button
755 | {
756 | background-color: transparent;
757 | subcontrol-origin: border;
758 | subcontrol-position: center right;
759 | }
760 |
761 | QAbstractSpinBox:down-button
762 | {
763 | background-color: transparent;
764 | subcontrol-origin: border;
765 | subcontrol-position: center left;
766 | }
767 |
768 | QAbstractSpinBox::up-arrow,
769 | QAbstractSpinBox::up-arrow:disabled,
770 | QAbstractSpinBox::up-arrow:off
771 | {
772 | border-image: url(:/light/up_arrow_disabled.svg);
773 | width: 0.9ex;
774 | height: 0.6ex;
775 | }
776 |
777 | QAbstractSpinBox::up-arrow:hover
778 | {
779 | border-image: url(:/light/up_arrow.svg);
780 | width: 0.9ex;
781 | height: 0.6ex;
782 | }
783 |
784 | QAbstractSpinBox::down-arrow,
785 | QAbstractSpinBox::down-arrow:disabled,
786 | QAbstractSpinBox::down-arrow:off
787 | {
788 | border-image: url(:/light/down_arrow_disabled.svg);
789 | width: 0.9ex;
790 | height: 0.6ex;
791 | }
792 |
793 | QAbstractSpinBox::down-arrow:hover
794 | {
795 | border-image: url(:/light/down_arrow.svg);
796 | width: 0.9ex;
797 | height: 0.6ex;
798 | }
799 |
800 | QLabel
801 | {
802 | border: 0ex solid black;
803 | }
804 |
805 | QTabWidget{
806 | border: 0.1ex solid #BAB9B8;
807 | }
808 |
809 | /* BORDERS */
810 | QTabWidget::pane
811 | {
812 | padding: 0.5ex;
813 | margin: 0.1ex;
814 | }
815 |
816 | QTabWidget::pane:top
817 | {
818 | border: 0.1ex solid #BAB9B8;
819 | top: -0.1ex;
820 | }
821 |
822 | QTabWidget::pane:bottom
823 | {
824 | border: 0.1ex solid #BAB9B8;
825 | bottom: -0.1ex;
826 | }
827 |
828 | QTabWidget::pane:left
829 | {
830 | border: 0.1ex solid #BAB9B8;
831 | right: -0.1ex;
832 | }
833 |
834 | QTabWidget::pane:right
835 | {
836 | border: 0.1ex solid #BAB9B8;
837 | left: -0.1ex;
838 | }
839 |
840 | QTabBar
841 | {
842 | qproperty-drawBase: 0;
843 | left: 0.5ex; /* move to the right by 0.5ex */
844 | border-radius: 0.3ex;
845 | }
846 |
847 | QTabBar:focus
848 | {
849 | border: 0ex transparent black;
850 | }
851 |
852 | QTabBar::close-button
853 | {
854 | border-image: url(:/light/close.svg);
855 | width: 1.2ex;
856 | height: 1.2ex;
857 | background: transparent;
858 | }
859 |
860 | QTabBar::close-button:hover
861 | {
862 | border-image: url(:/light/close-hover.svg);
863 | width: 1.2ex;
864 | height: 1.2ex;
865 | background: transparent;
866 | }
867 |
868 | QTabBar::close-button:pressed
869 | {
870 | border-image: url(:/light/close-pressed.svg);
871 | width: 1.2ex;
872 | height: 1.2ex;
873 | background: transparent;
874 | }
875 |
876 | /* TOP TABS */
877 | QTabBar::tab:top
878 | {
879 | color: #31363B;
880 | border: 0.1ex transparent black;
881 | border-left: 0.1ex solid #BAB9B8;
882 | border-top: 0.1ex solid #BAB9B8;
883 | background-color: #EFF0F1;
884 | padding: 0.5ex;
885 | min-width: 5ex;
886 | border-top-left-radius: 0.2ex;
887 | border-top-right-radius: 0.2ex;
888 | }
889 |
890 | QTabBar::tab:top:last,
891 | QTabBar::tab:top:only-one
892 | {
893 | color: #31363B;
894 | border: 0.1ex transparent black;
895 | border-left: 0.1ex solid #BAB9B8;
896 | border-right: 0.1ex solid #BAB9B8;
897 | border-top: 0.1ex solid #BAB9B8;
898 | background-color: #EFF0F1;
899 | padding: 0.5ex;
900 | min-width: 5ex;
901 | border-top-left-radius: 0.2ex;
902 | border-top-right-radius: 0.2ex;
903 | }
904 |
905 | QTabBar::tab:top:!selected
906 | {
907 | color: #31363B;
908 | background-color: #D9D8D7;
909 | border: 0.1ex transparent black;
910 | border-left: 0.1ex solid #BAB9B8;
911 | border-top-left-radius: 0.2ex;
912 | border-top-right-radius: 0.2ex;
913 | }
914 |
915 | QTabBar::tab:top:first:!selected
916 | {
917 | color: #31363B;
918 | background-color: #D9D8D7;
919 | border: 0.1ex transparent black;
920 | border-top-left-radius: 0.2ex;
921 | border-top-right-radius: 0.2ex;
922 | }
923 |
924 | QTabBar::tab:top:!selected:hover
925 | {
926 | background-color: rgba(61, 173, 232, 0.1);
927 | border: 0.1ex rgba(61, 173, 232, 0.1);
928 | border-left: 0.1ex solid #BAB9B8;
929 | }
930 |
931 | QTabBar::tab:top:!selected:first:hover
932 | {
933 | background-color: rgba(61, 173, 232, 0.1);
934 | border: 0.1ex rgba(61, 173, 232, 0.1);
935 | }
936 |
937 | /* BOTTOM TABS */
938 | QTabBar::tab:bottom
939 | {
940 | color: #31363B;
941 | border: 0.1ex transparent black;
942 | border-left: 0.1ex solid #BAB9B8;
943 | border-bottom: 0.1ex solid #BAB9B8;
944 | background-color: #EFF0F1;
945 | padding: 0.5ex;
946 | border-bottom-left-radius: 0.2ex;
947 | border-bottom-right-radius: 0.2ex;
948 | min-width: 5ex;
949 | }
950 |
951 | QTabBar::tab:bottom:last,
952 | QTabBar::tab:bottom:only-one
953 | {
954 | color: #31363B;
955 | border: 0.1ex transparent black;
956 | border-left: 0.1ex solid #BAB9B8;
957 | border-right: 0.1ex solid #BAB9B8;
958 | border-bottom: 0.1ex solid #BAB9B8;
959 | background-color: #EFF0F1;
960 | padding: 0.5ex;
961 | border-bottom-left-radius: 0.2ex;
962 | border-bottom-right-radius: 0.2ex;
963 | min-width: 5ex;
964 | }
965 |
966 | QTabBar::tab:bottom:!selected
967 | {
968 | color: #31363B;
969 | background-color: #D9D8D7;
970 | border: 0.1ex transparent black;
971 | border-left: 0.1ex solid #BAB9B8;
972 | border-bottom-left-radius: 0.2ex;
973 | border-bottom-right-radius: 0.2ex;
974 | }
975 |
976 | QTabBar::tab:bottom:first:!selected
977 | {
978 | color: #31363B;
979 | background-color: #D9D8D7;
980 | border: 0.1ex transparent black;
981 | border-bottom-left-radius: 0.2ex;
982 | border-bottom-right-radius: 0.2ex;
983 | }
984 |
985 | QTabBar::tab:bottom:!selected:hover
986 | {
987 | background-color: rgba(61, 173, 232, 0.1);
988 | border: 0.1ex rgba(61, 173, 232, 0.1);
989 | border-left: 0.1ex solid #BAB9B8;
990 | }
991 |
992 | QTabBar::tab:bottom:!selected:first:hover
993 | {
994 | background-color: rgba(61, 173, 232, 0.1);
995 | border: 0.1ex rgba(61, 173, 232, 0.1);
996 | }
997 |
998 | /* LEFT TABS */
999 | QTabBar::tab:left
1000 | {
1001 | color: #31363B;
1002 | border: 0.1ex transparent black;
1003 | border-top: 0.1ex solid #BAB9B8;
1004 | border-right: 0.1ex solid #BAB9B8;
1005 | background-color: #EFF0F1;
1006 | padding: 0.5ex;
1007 | border-top-right-radius: 0.2ex;
1008 | border-bottom-right-radius: 0.2ex;
1009 | min-height: 5ex;
1010 | }
1011 |
1012 | QTabBar::tab:left:last,
1013 | QTabBar::tab:left:only-one
1014 | {
1015 | color: #31363B;
1016 | border: 0.1ex transparent black;
1017 | border-top: 0.1ex solid #BAB9B8;
1018 | border-bottom: 0.1ex solid #BAB9B8;
1019 | border-right: 0.1ex solid #BAB9B8;
1020 | background-color: #EFF0F1;
1021 | padding: 0.5ex;
1022 | border-top-right-radius: 0.2ex;
1023 | border-bottom-right-radius: 0.2ex;
1024 | min-height: 5ex;
1025 | }
1026 |
1027 | QTabBar::tab:left:!selected
1028 | {
1029 | color: #31363B;
1030 | background-color: #D9D8D7;
1031 | border: 0.1ex transparent black;
1032 | border-top: 0.1ex solid #BAB9B8;
1033 | border-top-right-radius: 0.2ex;
1034 | border-bottom-right-radius: 0.2ex;
1035 | }
1036 |
1037 | QTabBar::tab:left:!selected:hover
1038 | {
1039 | background-color: rgba(61, 173, 232, 0.1);
1040 | border: 0.1ex rgba(61, 173, 232, 0.1);
1041 | border-top: 0.1ex solid #BAB9B8;
1042 | }
1043 |
1044 | QTabBar::tab:left:!selected:first:hover
1045 | {
1046 | background-color: rgba(61, 173, 232, 0.1);
1047 | border: 0.1ex rgba(61, 173, 232, 0.1);
1048 | }
1049 |
1050 | /* RIGHT TABS */
1051 | QTabBar::tab:right
1052 | {
1053 | color: #31363B;
1054 | border: 0.1ex transparent black;
1055 | border-top: 0.1ex solid #BAB9B8;
1056 | border-left: 0.1ex solid #BAB9B8;
1057 | background-color: #D9D8D7;
1058 | padding: 0.5ex;
1059 | border-top-left-radius: 0.2ex;
1060 | border-bottom-left-radius: 0.2ex;
1061 | min-height: 5ex;
1062 | }
1063 |
1064 | QTabBar::tab:right:last,
1065 | QTabBar::tab:right:only-one
1066 | {
1067 | color: #31363B;
1068 | border: 0.1ex transparent black;
1069 | border-top: 0.1ex solid #BAB9B8;
1070 | border-bottom: 0.1ex solid #BAB9B8;
1071 | border-left: 0.1ex solid #BAB9B8;
1072 | background-color: #D9D8D7;
1073 | padding: 0.5ex;
1074 | border-top-left-radius: 0.2ex;
1075 | border-bottom-left-radius: 0.2ex;
1076 | min-height: 5ex;
1077 | }
1078 |
1079 | QTabBar::tab:right:!selected
1080 | {
1081 | color: #31363B;
1082 | background-color: #54575B;
1083 | border: 0.1ex transparent black;
1084 | border-top: 0.1ex solid #BAB9B8;
1085 | border-top-left-radius: 0.2ex;
1086 | border-bottom-left-radius: 0.2ex;
1087 | }
1088 |
1089 | QTabBar::tab:right:!selected:hover
1090 | {
1091 | background-color: rgba(61, 173, 232, 0.1);
1092 | border: 0.1ex rgba(61, 173, 232, 0.1);
1093 | border-top: 0.1ex solid #BAB9B8;
1094 | }
1095 |
1096 | QTabBar::tab:right:!selected:first:hover
1097 | {
1098 | background-color: rgba(61, 173, 232, 0.1);
1099 | border: 0.1ex rgba(61, 173, 232, 0.1);
1100 | }
1101 |
1102 | QTabBar QToolButton::right-arrow:enabled
1103 | {
1104 | border-image: url(:/light/right_arrow.svg);
1105 | }
1106 |
1107 | QTabBar QToolButton::left-arrow:enabled
1108 | {
1109 | border-image: url(:/light/left_arrow.svg);
1110 | }
1111 |
1112 | QTabBar QToolButton::right-arrow:disabled
1113 | {
1114 | border-image: url(:/light/right_arrow_disabled.svg);
1115 | }
1116 |
1117 | QTabBar QToolButton::left-arrow:disabled
1118 | {
1119 | border-image: url(:/light/left_arrow_disabled.svg);
1120 | }
1121 |
1122 | QDockWidget
1123 | {
1124 | background: #EFF0F1;
1125 | border: 0.1ex solid #403F3F;
1126 | titlebar-close-icon: url(:/light/transparent.svg);
1127 | titlebar-normal-icon: url(:/light/transparent.svg);
1128 | }
1129 |
1130 | QDockWidget::close-button,
1131 | QDockWidget::float-button
1132 | {
1133 | border: 0.1ex solid transparent;
1134 | border-radius: 0.2ex;
1135 | background: transparent;
1136 | }
1137 |
1138 |
1139 | QDockWidget::float-button
1140 | {
1141 | border-image: url(:/dark/undock.svg);
1142 | }
1143 |
1144 | QDockWidget::float-button:hover
1145 | {
1146 | border-image: url(:/dark/undock-hover.svg) ;
1147 | }
1148 |
1149 | QDockWidget::close-button
1150 | {
1151 | border-image: url(:/dark/close.svg) ;
1152 | }
1153 |
1154 | QDockWidget::close-button:hover
1155 | {
1156 | border-image: url(:/dark/close-hover.svg) ;
1157 | }
1158 |
1159 | QDockWidget::close-button:pressed
1160 | {
1161 | border-image: url(:/dark/close-pressed.svg) ;
1162 | }
1163 |
1164 | QTreeView,
1165 | QListView
1166 | {
1167 | border: 0.1ex solid #BAB9B8;
1168 | background-color: #FCFCFC;
1169 | }
1170 |
1171 |
1172 | QTreeView::branch:has-siblings:!adjoins-item
1173 | {
1174 | border-image: url(:/light/stylesheet-vline.svg) 0;
1175 | }
1176 |
1177 | QTreeView::branch:has-siblings:adjoins-item
1178 | {
1179 | border-image: url(:/light/stylesheet-branch-more.svg) 0;
1180 | }
1181 |
1182 | QTreeView::branch:!has-children:!has-siblings:adjoins-item
1183 | {
1184 | border-image: url(:/light/stylesheet-branch-end.svg) 0;
1185 | }
1186 |
1187 | QTreeView::branch:has-children:!has-siblings:closed,
1188 | QTreeView::branch:closed:has-children:has-siblings
1189 | {
1190 | border-image: url(:/light/branch-closed.svg);
1191 | }
1192 |
1193 | QTreeView::branch:open:has-children:!has-siblings,
1194 | QTreeView::branch:open:has-children:has-siblings
1195 | {
1196 | border-image: url(:/light/branch-open.svg);
1197 | }
1198 |
1199 | QTableView::item,
1200 | QListView::item,
1201 | QTreeView::item
1202 | {
1203 | padding: 0.3ex;
1204 | border-bottom: 0.1ex solid #BAB9B8 ;
1205 | border-left: 0.1ex solid #BAB9B8 ;
1206 | }
1207 |
1208 | QTableView::item:!selected:hover,
1209 | QListView::item:!selected:hover,
1210 | QTreeView::item:!selected:hover
1211 | {
1212 | background-color: rgba(61, 173, 232, 0.1);
1213 | outline: 0;
1214 | color: #31363B;
1215 | padding: 0.3ex;
1216 | }
1217 |
1218 | QSlider::groove:horizontal
1219 | {
1220 | border: 0.1ex solid #EFF0F1;
1221 | height: 0.4ex;
1222 | background: #9CA0A4;
1223 | margin: 0px;
1224 | border-radius: 0.2ex;
1225 | }
1226 |
1227 | QSlider::handle:horizontal
1228 | {
1229 | background: #D9D8D7;
1230 | border: 0.1ex solid #BABEC2;
1231 | width: 1.6ex;
1232 | height: 1.6ex;
1233 | margin: -0.8ex 0;
1234 | border-radius: 0.9ex;
1235 | }
1236 |
1237 | QSlider::groove:vertical
1238 | {
1239 | border: 0.1ex solid #EFF0F1;
1240 | width: 0.4ex;
1241 | background: #9CA0A4;
1242 | margin: 0ex;
1243 | border-radius: 0.3ex;
1244 | }
1245 |
1246 | QSlider::handle:vertical
1247 | {
1248 | background: #D9D8D7;
1249 | border: 0.1ex solid #BABEC2;
1250 | width: 1.6ex;
1251 | height: 1.6ex;
1252 | margin: 0 -0.8ex;
1253 | border-radius: 0.9ex;
1254 | }
1255 |
1256 | QSlider::handle:horizontal:focus,
1257 | QSlider::handle:vertical:focus
1258 | {
1259 | border: 0.1ex solid #33A4DF;
1260 | }
1261 |
1262 | QSlider::handle:horizontal:hover,
1263 | QSlider::handle:vertical:hover
1264 | {
1265 | border: 0.1ex solid #51c2fc;
1266 | }
1267 |
1268 | QSlider::sub-page:horizontal,
1269 | QSlider::add-page:vertical
1270 | {
1271 | background: #33A4DF;
1272 | border-radius: 0.3ex;
1273 | }
1274 |
1275 | QSlider::add-page:horizontal,
1276 | QSlider::sub-page:vertical
1277 | {
1278 | background: #BABEC2;
1279 | border-radius: 0.3ex;
1280 | }
1281 |
1282 | QToolButton
1283 | {
1284 | background-color: transparent;
1285 | border: 0.1ex solid #BAB9B8;
1286 | border-radius: 0.2ex;
1287 | margin: 0.3ex;
1288 | padding: 0.5ex;
1289 | padding-right:2ex; /*shift indicator right edited by keshav*/
1290 | }
1291 |
1292 | QToolButton[popupMode="1"] /* only for MenuButtonPopup */
1293 | {
1294 | padding-right: 2ex; /* make way for the popup button */
1295 | }
1296 |
1297 | QToolButton[popupMode="2"] /* only for InstantPopup */
1298 | {
1299 | padding-right: 1ex; /* make way for the popup button */
1300 | }
1301 |
1302 | QToolButton::menu-indicator
1303 | {
1304 | border-image: url(:/light/down_arrow.svg);
1305 | top: -0.7ex; left: -0.2ex; /* shift it a bit */
1306 | width = 0.9ex;
1307 | height = 0.6ex;
1308 | }
1309 |
1310 | QToolButton::menu-arrow
1311 | {
1312 | border-image: url(:/light/down_arrow.svg);
1313 | width = 0.9ex;
1314 | height = 0.6ex;
1315 | }
1316 |
1317 | QToolButton:hover,
1318 | QToolButton::menu-button:hover
1319 | {
1320 | background-color: transparent;
1321 | border: 0.1ex solid #33A4DF;
1322 | }
1323 |
1324 | QToolButton:checked,
1325 | QToolButton:pressed,
1326 | QToolButton::menu-button:pressed
1327 | {
1328 | background-color: #47b8fc;
1329 | border: 0.1ex solid #47b8fc;
1330 | padding: 0.5ex;
1331 | }
1332 |
1333 | QToolButton::menu-button
1334 | {
1335 | border: 0.1ex solid #BAB9B8;
1336 | border-top-right-radius: 6px;
1337 | border-bottom-right-radius: 6px;
1338 | /* 1ex width + 0.4ex for border + no text = 2ex allocated above */
1339 | width: 1ex;
1340 | padding: 0.5ex;
1341 | outline: none;
1342 | }
1343 |
1344 | QToolButton::menu-arrow:open
1345 | {
1346 | border: 0.1ex solid #BAB9B8;
1347 | }
1348 |
1349 | QPushButton::menu-indicator
1350 | {
1351 | subcontrol-origin: padding;
1352 | subcontrol-position: bottom right;
1353 | left: 0.8ex;
1354 | }
1355 |
1356 | QTableView
1357 | {
1358 | border: 0.1ex solid #BAB9B8;
1359 | gridline-color: #BAB9B8;
1360 | background-color: #FCFCFC;
1361 | }
1362 |
1363 |
1364 | QTableView,
1365 | QHeaderView
1366 | {
1367 | border-radius: 0px;
1368 | }
1369 |
1370 | QTableView::item:pressed
1371 | {
1372 | background: #33A4DF;
1373 | color: #31363B;
1374 | }
1375 |
1376 | QTableView::item:selected:active
1377 | {
1378 | background: #33A4DF;
1379 | color: #31363B;
1380 | }
1381 |
1382 | QTableView::item:selected:hover
1383 | {
1384 | background-color: #47b8f3;
1385 | color: #31363B;
1386 | }
1387 |
1388 | QListView::item:pressed,
1389 | QTreeView::item:pressed
1390 | {
1391 | background: #3daee9;
1392 | color: #31363B;
1393 | }
1394 |
1395 | QTreeView::item:selected:active,
1396 | QListView::item:selected:active
1397 | {
1398 | background: #3daee9;
1399 | color: #31363B;
1400 | }
1401 |
1402 | QListView::item:selected:hover,
1403 | QTreeView::item:selected:hover
1404 | {
1405 | background-color: #51c2fc;
1406 | color: #31363B;
1407 | }
1408 |
1409 |
1410 | QHeaderView
1411 | {
1412 | background-color: #EFF0F1;
1413 | border: 0.1ex transparent;
1414 | border-radius: 0px;
1415 | margin: 0px;
1416 | padding: 0px;
1417 | }
1418 |
1419 | QHeaderView::section
1420 | {
1421 | background-color: #EFF0F1;
1422 | color: #31363B;
1423 | padding: 0.5ex;
1424 | border: 0.1ex solid #BAB9B8;
1425 | border-top: 0px;
1426 | border-radius: 0px;
1427 | text-align: center;
1428 | }
1429 |
1430 | QHeaderView::section::vertical::first,
1431 | QHeaderView::section::vertical::only-one
1432 | {
1433 | border-top: 0.1ex solid #BAB9B8;
1434 | }
1435 |
1436 | QHeaderView::section::vertical
1437 | {
1438 | border-top: transparent;
1439 | border-left: 0px;
1440 | border-right: 0px;
1441 | }
1442 |
1443 | QHeaderView::section::horizontal::first, QHeaderView::section::horizontal::only-one
1444 | {
1445 | border-left: 0.1ex solid #BAB9B8;
1446 | }
1447 | QHeaderView::section::horizontal::last, QHeaderView::section::horizontal::only-one
1448 | {
1449 | border-right: 0px;
1450 | }
1451 |
1452 | QHeaderView::section::horizontal
1453 | {
1454 | border-left: 0px;
1455 | }
1456 |
1457 |
1458 | QHeaderView::section:checked
1459 |
1460 | {
1461 | color: black;
1462 | background-color: #b9dae7;
1463 | }
1464 |
1465 | /* style the sort indicator */
1466 | QHeaderView::down-arrow
1467 | {
1468 | image: url(:/light/down_arrow.svg);
1469 | }
1470 |
1471 | QHeaderView::up-arrow
1472 | {
1473 | image: url(:/light/up_arrow.svg);
1474 | }
1475 |
1476 | QTableCornerButton::section
1477 | {
1478 | background-color: #EFF0F1;
1479 | border: 0.1ex transparent #BAB9B8;
1480 | border-radius: 0px;
1481 | }
1482 |
1483 | QToolBox
1484 | {
1485 | padding: 0.5ex;
1486 | border: 0.1ex transparent black;
1487 | }
1488 |
1489 | QToolBox:selected
1490 | {
1491 | background-color: #EFF0F1;
1492 | border-color: #33A4DF;
1493 | }
1494 |
1495 | QToolBox:hover
1496 | {
1497 | border-color: #33A4DF;
1498 | }
1499 |
1500 | QStatusBar::item
1501 | {
1502 | border: 0px transparent dark;
1503 | }
1504 |
1505 | QSplitter::handle
1506 | {
1507 | border: 0.1ex dashed #BAB9B8;
1508 | }
1509 |
1510 | QSplitter::handle:hover
1511 | {
1512 | background-color: #787876;
1513 | border: 0.1ex solid #BAB9B8;
1514 | }
1515 |
1516 | QSplitter::handle:horizontal
1517 | {
1518 | width: 0.1ex;
1519 | }
1520 |
1521 | QSplitter::handle:vertical
1522 | {
1523 | height: 0.1ex;
1524 | }
1525 |
1526 | QProgressBar:horizontal
1527 | {
1528 | background-color: #BABEC2;
1529 | border: 0.1ex solid #EFF0F1;
1530 | border-radius: 0.3ex;
1531 | height: 0.5ex;
1532 | text-align: right;
1533 | margin-top: 0.5ex;
1534 | margin-bottom: 0.5ex;
1535 | margin-right: 5ex;
1536 | padding: 0px;
1537 | }
1538 |
1539 | QProgressBar::chunk:horizontal
1540 | {
1541 | background-color: #33A4DF;
1542 | border: 0.1ex transparent;
1543 | border-radius: 0.3ex;
1544 | }
1545 |
1546 | QAbstractSpinBox
1547 | {
1548 | background-color: #EFF0F1;
1549 | }
1550 |
1551 | QSpinBox,
1552 | QDoubleSpinBox
1553 | {
1554 | padding-right: 0.4ex;
1555 | }
1556 |
1557 | QSpinBox::up-button,
1558 | QDoubleSpinBox::up-button
1559 | {
1560 | subcontrol-origin: content;
1561 | subcontrol-position: right top;
1562 |
1563 | width: 1.6ex;
1564 | border-width: 0.1ex;
1565 | }
1566 |
1567 | QSpinBox::up-arrow,
1568 | QDoubleSpinBox::up-arrow
1569 | {
1570 | border-image: url(:/light/up_arrow.svg);
1571 | width: 0.9ex;
1572 | height: 0.6ex;
1573 | }
1574 |
1575 | QSpinBox::up-arrow:hover,
1576 | QSpinBox::up-arrow:pressed,
1577 | QDoubleSpinBox::up-arrow:hover,
1578 | QDoubleSpinBox::up-arrow:pressed
1579 | {
1580 | border-image: url(:/light/up_arrow-hover.svg);
1581 | width: 0.9ex;
1582 | height: 0.6ex;
1583 | }
1584 |
1585 | QSpinBox::up-arrow:disabled,
1586 | QSpinBox::up-arrow:off,
1587 | QDoubleSpinBox::up-arrow:disabled,
1588 | QDoubleSpinBox::up-arrow:off
1589 | {
1590 | border-image: url(:/light/up_arrow_disabled.svg);
1591 | }
1592 |
1593 | QSpinBox::down-button,
1594 | QDoubleSpinBox::down-button
1595 | {
1596 | subcontrol-origin: content;
1597 | subcontrol-position: right bottom;
1598 |
1599 | width: 1.6ex;
1600 | border-width: 0.1ex;
1601 | }
1602 |
1603 | QSpinBox::down-arrow,
1604 | QDoubleSpinBox::down-arrow
1605 | {
1606 | border-image: url(:/light/down_arrow.svg);
1607 | width: 0.9ex;
1608 | height: 0.6ex;
1609 | }
1610 |
1611 | QSpinBox::down-arrow:hover,
1612 | QSpinBox::down-arrow:pressed,
1613 | QDoubleSpinBox::down-arrow:hover,
1614 | QDoubleSpinBox::down-arrow:pressed
1615 | {
1616 | border-image: url(:/light/down_arrow-hover.svg);
1617 | width: 0.9ex;
1618 | height: 0.6ex;
1619 | }
1620 |
1621 | QSpinBox::down-arrow:disabled,
1622 | QSpinBox::down-arrow:off,
1623 | QDoubleSpinBox::down-arrow:disabled,
1624 | QDoubleSpinBox::down-arrow:off
1625 | {
1626 | border-image: url(:/light/down_arrow_disabled.svg);
1627 | }
1628 |
--------------------------------------------------------------------------------