diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index 525dd98c..b6f762f8 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -1,5 +1,4 @@ import time -import keeprefs import os, threading from traceback import print_exc from myutils.config import ( diff --git a/LunaTranslator/LunaTranslator/LunaTranslator_main.py b/LunaTranslator/LunaTranslator/LunaTranslator_main.py index 9aa45b2a..ecd3ed70 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator_main.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator_main.py @@ -11,7 +11,8 @@ if __name__ == "__main__": ) # win7 no vcredist2015 from myutils.config import _TR, static_data, globalconfig - + + sys.path.append("./") sys.path.append("./userconfig") sys.path.insert( 0, "./LunaTranslator/network/" + ["winhttp", "libcurl"][globalconfig["network"]] diff --git a/LunaTranslator/LunaTranslator/gui/settin.py b/LunaTranslator/LunaTranslator/gui/settin.py index 7233c53d..d86e22b0 100644 --- a/LunaTranslator/LunaTranslator/gui/settin.py +++ b/LunaTranslator/LunaTranslator/gui/settin.py @@ -14,7 +14,7 @@ from PyQt5.QtWidgets import ( ) from PyQt5.QtGui import QResizeEvent, QFont, QFontMetrics from PyQt5.QtWidgets import QTabWidget -import qtawesome, gobject +import qtawesome, gobject, importlib, sys import functools, threading, windows, winsharedutils from traceback import print_exc from winsharedutils import isDark @@ -263,20 +263,26 @@ class Settin(closeashidewindow): winsharedutils.SetTheme( int(widget.winId()), dark, globalconfig["WindowBackdrop"] ) - try: - idx = globalconfig[darklight + "theme"] - int(not dark) - if idx == -1: - raise Exception() - with open( - "./files/themes/{}".format( - static_data["themes"][darklight][idx]["file"] - ), - "r", - ) as ff: - style = ff.read() - except: - # print_exc() - style = "" + for _ in (0,): + try: + idx = globalconfig[darklight + "theme"] - int(not dark) + if idx == -1: + break + _fn = static_data["themes"][darklight][idx]["file"] + + if _fn.endswith(".py"): + style = importlib.import_module( + "files.themes." + _fn[:-3] + ).stylesheet() + elif _fn.endswith(".qss"): + with open( + "./files/themes/{}".format(_fn), + "r", + ) as ff: + style = ff.read() + except: + print_exc() + style = "" style += ( "*{font: %spt '" % (globalconfig["settingfontsize"]) + (globalconfig["settingfonttype"]) diff --git a/LunaTranslator/LunaTranslator/keeprefs.py b/LunaTranslator/LunaTranslator/keeprefs.py index fd43faf7..11802e17 100644 --- a/LunaTranslator/LunaTranslator/keeprefs.py +++ b/LunaTranslator/LunaTranslator/keeprefs.py @@ -5,4 +5,6 @@ import xml.etree.ElementTree as ET import hashlib import configparser from wsgiref.handlers import format_date_time -from html.parser import HTMLParser \ No newline at end of file +from html.parser import HTMLParser +import qdarkstyle +import qdarktheme \ No newline at end of file diff --git a/LunaTranslator/files/defaultconfig/static_data.json b/LunaTranslator/files/defaultconfig/static_data.json index 35637f62..24611822 100644 --- a/LunaTranslator/files/defaultconfig/static_data.json +++ b/LunaTranslator/files/defaultconfig/static_data.json @@ -2,21 +2,21 @@ "themes": { "dark": [ { - "file": "dark1.qss", + "file": "dark1.py", "name": "PyQtDarkTheme" }, { - "file": "dark2.qss", + "file": "dark2.py", "name": "QDarkStyleSheet" } ], "light": [ { - "file": "light1.qss", + "file": "light1.py", "name": "PyQtDarkTheme" }, { - "file": "light2.qss", + "file": "light2.py", "name": "QDarkStyleSheet" } ] diff --git a/LunaTranslator/files/themes/dark1.py b/LunaTranslator/files/themes/dark1.py new file mode 100644 index 00000000..182d4035 --- /dev/null +++ b/LunaTranslator/files/themes/dark1.py @@ -0,0 +1,3 @@ +import qdarktheme +def stylesheet(): + return qdarktheme.load_stylesheet(theme='dark') \ No newline at end of file diff --git a/LunaTranslator/files/themes/dark1.qss b/LunaTranslator/files/themes/dark1.qss deleted file mode 100644 index 1d54b333..00000000 --- a/LunaTranslator/files/themes/dark1.qss +++ /dev/null @@ -1 +0,0 @@ -QWidget {background:rgba(32, 33, 36, 1.000);color:rgba(228, 231, 235, 1.000);selection-color:rgba(228, 231, 235, 1.000);selection-background-color:rgba(95, 154, 244, 0.400)}QWidget:disabled {color:rgba(228, 231, 235, 0.400);selection-background-color:rgba(228, 231, 235, 0.200);selection-color:rgba(228, 231, 235, 0.400)}QWidget:focus {outline:none}QCheckBox:!window,QRadioButton:!window,QPushButton:!window,QLabel:!window,QLCDNumber:!window {background:transparent}QMdiSubWindow > QCheckBox:!window,QMdiSubWindow > QRadioButton:!window,QMdiSubWindow > QPushButton:!window,QMdiSubWindow > QLabel:!window,QMdiSubWindow > QLCDNumber:!window {background:rgba(32, 33, 36, 1.000)}QMainWindow::separator {width:4px;height:4px;background:rgba(63, 64, 66, 1.000)}QMainWindow::separator:hover,QMainWindow::separator:pressed {background:rgba(138, 180, 247, 1.000)}QToolTip {background:rgba(42, 43, 47, 1.000);color:rgba(228, 231, 235, 1.000)}QSizeGrip {width:0;height:0;image:none}QStatusBar {background:rgba(42, 43, 46, 1.000)}QStatusBar::item {border:none}QStatusBar QWidget {background:transparent;padding:3px;border-radius:4px}QStatusBar > .QSizeGrip {padding:0}QStatusBar QWidget:hover {background:rgba(255, 255, 255, 0.133)}QStatusBar QWidget:pressed,QStatusBar QWidget:checked {background:rgba(255, 255, 255, 0.204)}QCheckBox,QRadioButton {border-top:2px solid transparent;border-bottom:2px solid transparent}QCheckBox:hover,QRadioButton:hover {border-bottom:2px solid rgba(138, 180, 247, 1.000)}QGroupBox {font-weight:bold;margin-top:8px;padding:2px 1px 1px 1px;border-radius:4px;border:1px solid rgba(63, 64, 66, 1.000)}QGroupBox::title {subcontrol-origin:margin;subcontrol-position:top left;left:7px;margin:0 2px 0 3px}QGroupBox:flat {border-color:transparent}QMenuBar {padding:2px;border-bottom:1px solid rgba(63, 64, 66, 1.000);background:rgba(32, 33, 36, 1.000)}QMenuBar::item {background:transparent;padding:4px}QMenuBar::item:selected {padding:4px;border-radius:4px;background:rgba(255, 255, 255, 0.145)}QMenuBar::item:pressed {padding:4px;margin-bottom:0;padding-bottom:0}QToolBar {padding:1px;font-weight:bold;spacing:2px;margin:1px;background:rgba(51, 51, 51, 1.000);border-style:none}QToolBar::handle:horizontal {width:20px;}QToolBar::handle:vertical {height:20px;}QToolBar::handle:horizontal:disabled {}QToolBar::handle:vertical:disabled {}QToolBar::separator {background:rgba(63, 64, 66, 1.000)}QToolBar::separator:horizontal {width:2px;margin:0 6px}QToolBar::separator:vertical {height:2px;margin:6px 0}QToolBar > QToolButton {background:transparent;padding:3px;border-radius:4px}QToolBar > QToolButton:hover,QToolBar > QToolButton::menu-button:hover {background:rgba(255, 255, 255, 0.133)}QToolBar > QToolButton::menu-button {border-top-right-radius:4px;border-bottom-right-radius:4px}QToolBar > QToolButton:pressed,QToolBar > QToolButton::menu-button:pressed:enabled,QToolBar > QToolButton:checked:enabled {background:rgba(255, 255, 255, 0.204)}QToolBar > QWidget {background:transparent}QMenu {background:rgba(42, 43, 47, 1.000);padding:8px 0; }QMenu::separator {margin:4px 0;height:1px;background:rgba(63, 64, 66, 1.000)}QMenu::item {padding:4px 19px}QMenu::item:selected {background:rgba(255, 255, 255, 0.133)}QMenu::icon {padding-left:10px;width:14px;height:14px}QMenu::right-arrow {margin:2px;padding-left:12px;height:20px;width:20px;}QMenu::right-arrow:disabled {}QScrollBar {background:rgba(255, 255, 255, 0.063);border-radius:4px;}QScrollBar:horizontal {height:14px;}QScrollBar:vertical {width:14px;}QScrollBar::handle {background:rgba(255, 255, 255, 0.188);border-radius:3px}QScrollBar::handle:hover {background:rgba(255, 255, 255, 0.271)}QScrollBar::handle:pressed {background:rgba(255, 255, 255, 0.376)}QScrollBar::handle:disabled {background:rgba(255, 255, 255, 0.082)}QScrollBar::handle:horizontal {min-width:8px;margin:4px 14px;}QScrollBar::handle:horizontal:hover {margin:2px 14px;}QScrollBar::handle:vertical {min-height:8px;margin:14px 4px;}QScrollBar::handle:vertical:hover {margin:14px 2px;}QScrollBar::sub-page,QScrollBar::add-page {background:transparent}QScrollBar::sub-line,QScrollBar::add-line {background:transparent;}QScrollBar::up-arrow:enabled {}QScrollBar::right-arrow:enabled {}QScrollBar::down-arrow:enabled {}QScrollBar::left-arrow:enabled {}QScrollBar::up-arrow:hover {}QScrollBar::right-arrow:hover {}QScrollBar::down-arrow:hover {}QScrollBar::left-arrow:hover {}QProgressBar {text-align:center;border:1px solid rgba(63, 64, 66, 1.000);border-radius:4px}QProgressBar::chunk {background:rgba(102, 159, 245, 1.000);border-radius:3px}QProgressBar::chunk:disabled {background:rgba(228, 231, 235, 0.200)}QPushButton {color:rgba(138, 180, 247, 1.000);border:1px solid rgba(63, 64, 66, 1.000);padding:4px 8px;border-radius:4px}QPushButton:flat,QPushButton:default {border:none;padding:5px 9px}QPushButton:default {color:rgba(32, 33, 36, 1.000);background:rgba(138, 180, 247, 1.000)}QPushButton:hover {background:rgba(102, 159, 245, 0.110)}QPushButton:pressed {background:rgba(87, 150, 244, 0.230)}QPushButton:checked:enabled {background:rgba(87, 150, 244, 0.230)}QPushButton:default:hover {background:rgba(117, 168, 246, 1.000)}QPushButton:default:pressed,QPushButton:default:checked {background:rgba(95, 154, 244, 1.000)}QPushButton:default:disabled,QPushButton:default:checked:disabled {background:rgba(228, 231, 235, 0.200)}QDialogButtonBox {dialogbuttonbox-buttons-have-icons:0}QDialogButtonBox QPushButton {min-width:65px}QToolButton {background:transparent;padding:5px;spacing:2px;border-radius:2px}QToolButton:hover,QToolButton::menu-button:hover {background:rgba(102, 159, 245, 0.110)}QToolButton:pressed,QToolButton:checked:pressed,QToolButton::menu-button:pressed:enabled {background:rgba(87, 150, 244, 0.230)}QToolButton:selected:enabled,QToolButton:checked:enabled {background:rgba(87, 150, 244, 0.230)}QToolButton::menu-indicator {height:18px;width:18px;top:6px;left:3px;}QToolButton::menu-indicator:disabled {}QToolButton::menu-arrow {image:unset}QToolButton::menu-button {subcontrol-origin:margin;width:17px;border-top-right-radius:2px;border-bottom-right-radius:2px;}QToolButton::menu-button:disabled {}QToolButton[popupMode="1"] {padding-right:1px;margin-right:18px;border-top-right-radius:0;border-bottom-right-radius:0}QComboBox {min-height:1.5em;padding:0 8px 0 4px;background:rgba(63, 64, 66, 1.000);border:1px solid rgba(63, 64, 66, 1.000);border-radius:4px}QComboBox:focus,QComboBox:open {border-color:rgba(138, 180, 247, 1.000)}QComboBox::drop-down {margin:2px 2px 2px -6px;border-radius:4}QComboBox::drop-down:editable:hover {background:rgba(255, 255, 255, 0.145)}QComboBox::down-arrow {}QComboBox::down-arrow:disabled {}QComboBox::down-arrow:editable:open {}QComboBox::down-arrow:editable:open:disabled {}QComboBox::item:selected {border:none;background:rgba(66, 136, 242, 0.400);border-radius:4px}QComboBox QListView[frameShape="0"] {margin:0;padding:4px;background:rgba(42, 43, 47, 1.000);selection-background-color:rgba(66, 136, 242, 0.400); border-radius:0; }QComboBox QListView::item {border-radius:4px}QSlider {padding:2px 0}QSlider::groove {border-radius:2px}QSlider::groove:horizontal {height:4px}QSlider::groove:vertical {width:4px}QSlider::sub-page:horizontal,QSlider::add-page:vertical,QSlider::handle {background:rgba(138, 180, 247, 1.000)}QSlider::sub-page:horizontal:disabled,QSlider::add-page:vertical:disabled,QSlider::handle:disabled {background:rgba(228, 231, 235, 0.200)}QSlider::add-page:horizontal,QSlider::sub-page:vertical {background:rgba(228, 231, 235, 0.100)}QSlider::handle:hover,QSlider::handle:pressed {background:rgba(106, 161, 245, 1.000)}QSlider::handle:horizontal {width:16px;height:8px;margin:-6px 0;border-radius:8px}QSlider::handle:vertical {width:8px;height:16px;margin:0 -6px;border-radius:8px}QTabWidget::pane {border:1px solid rgba(63, 64, 66, 1.000);border-radius:4px}QTabBar {qproperty-drawBase:0}QTabBar::close-button {}QTabBar::close-button:hover {background:rgba(255, 255, 255, 0.145);border-radius:4px}QTabBar::close-button:!selected {}QTabBar::close-button:disabled {}QTabBar::tab {padding:3px;border-style:solid}QTabBar::tab:hover,QTabBar::tab:selected:hover:enabled {background:rgba(255, 255, 255, 0.094)}QTabBar::tab:selected:enabled {color:rgba(138, 180, 247, 1.000);background:rgba(255, 255, 255, 0.000);border-color:rgba(138, 180, 247, 1.000)}QTabBar::tab:selected:disabled,QTabBar::tab:only-one:selected:enabled {border-color:rgba(63, 64, 66, 1.000)}QTabBar::tab:top {border-bottom-width:2px;margin:3px 6px 0 0;border-top-left-radius:2px;border-top-right-radius:2px}QTabBar::tab:bottom {border-top-width:2px;margin:0 6px 3px 0;border-bottom-left-radius:2px;border-bottom-right-radius:2px}QTabBar::tab:left {border-right-width:2px;margin:0 0 6px 3px;border-top-left-radius:2px;border-bottom-left-radius:2px}QTabBar::tab:right {border-left-width:2px;margin-bottom:6px;margin:0 3px 6px 0;border-top-right-radius:2px;border-bottom-right-radius:2px}QTabBar::tab:top:first,QTabBar::tab:top:only-one,QTabBar::tab:bottom:first,QTabBar::tab:bottom:only-one {margin-left:2px}QTabBar::tab:top:last,QTabBar::tab:top:only-one,QTabBar::tab:bottom:last,QTabBar::tab:bottom:only-one {margin-right:2px}QTabBar::tab:left:first,QTabBar::tab:left:only-one,QTabBar::tab:right:first,QTabBar::tab:right:only-one {margin-top:2px}QTabBar::tab:left:last,QTabBar::tab:left:only-one,QTabBar::tab:right:last,QTabBar::tab:right:only-one {margin-bottom:2px}QDockWidget {border:1px solid rgba(63, 64, 66, 1.000);border-radius:4px}QDockWidget::title {padding:3px;spacing:4px;background:rgba(22, 23, 25, 1.000)}QDockWidget::close-button,QDockWidget::float-button {border-radius:2px}QDockWidget::close-button:hover,QDockWidget::float-button:hover {background:rgba(102, 159, 245, 0.110)}QDockWidget::close-button:pressed,QDockWidget::float-button:pressed {background:rgba(87, 150, 244, 0.230)}QFrame {border:1px solid rgba(63, 64, 66, 1.000);padding:1px;border-radius:4px}.QFrame {padding:0}QFrame[frameShape="0"] {border-color:transparent;padding:0}.QFrame[frameShape="0"] {border:none}QFrame[frameShape="2"] {border-color:rgba(22, 23, 25, 1.000);background:rgba(22, 23, 25, 1.000)}QFrame[frameShape="4"] {max-height:2px;border:none;background:rgba(63, 64, 66, 1.000)}QFrame[frameShape="5"] {max-width:2px;border:none;background:rgba(63, 64, 66, 1.000)}QLCDNumber {min-width:2em;margin:2px}QToolBox::tab {background:rgba(22, 23, 25, 1.000);border-bottom:2px solid rgba(63, 64, 66, 1.000);border-top-left-radius:4px;border-top-right-radius:4px}QToolBox::tab:selected:enabled {border-bottom-color:rgba(138, 180, 247, 1.000)}QSplitter::handle {background:rgba(63, 64, 66, 1.000);margin:1px 3px}QSplitter::handle:hover {background:rgba(138, 180, 247, 1.000)}QSplitter::handle:horizontal {width:5px;}QSplitter::handle:horizontal:disabled {}QSplitter::handle:vertical {height:5px;}QSplitter::handle:vertical:disabled {}QSplitterHandle::item:hover {}QAbstractScrollArea {margin:1px}QAbstractScrollArea::corner {background:transparent}QAbstractScrollArea > .QWidget {background:transparent}QAbstractScrollArea > .QWidget > .QWidget {background:transparent}QMdiArea {qproperty-background:rgba(22, 23, 25, 1.000);border-radius:0}QMdiSubWindow {background:rgba(32, 33, 36, 1.000);border:1px solid;padding:0 3px}QMdiSubWindow > QWidget {border:1px solid rgba(63, 64, 66, 1.000)}QTextEdit, QPlainTextEdit {background:rgba(28, 29, 31, 1.000)}QTextEdit:focus,QTextEdit:selected,QPlainTextEdit:focus,QPlainTextEdit:selected {border:1px solid rgba(138, 180, 247, 1.000);selection-background-color:rgba(95, 154, 244, 0.400)}QTextEdit:!focus,QPlainTextEdit:!focus { selection-background-color:rgba(255, 255, 255, 0.125)}QTextEdit:!active,QPlainTextEdit:!active { }QAbstractItemView {padding:0;alternate-background-color:transparent;selection-background-color:transparent}QAbstractItemView:disabled {selection-background-color:transparent}QAbstractItemView::item:alternate,QAbstractItemView::branch:alternate {background:rgba(255, 255, 255, 0.047)}QAbstractItemView::item:selected,QAbstractItemView::branch:selected {background:rgba(66, 136, 242, 0.400)}QAbstractItemView::item:selected:!active,QAbstractItemView::branch:selected:!active {background:rgba(210, 227, 252, 0.150)}QAbstractItemView QLineEdit,QAbstractItemView QAbstractSpinBox,QAbstractItemView QAbstractButton {padding:0;margin:1px}QListView {padding:1px}QListView,QTreeView {background:rgba(32, 33, 36, 1.000)}QListView::item:!selected:hover,QTreeView::item:!selected:hover,QTreeView::branch:!selected:hover {background:rgba(255, 255, 255, 0.075)}QTreeView::branch:!selected:hover,QTreeView::branch:alternate,QTreeView::branch:selected,QTreeView::branch:selected:!active { }QTreeView::branch {border- 0}QTreeView::branch:active {border- 0}QTreeView::branch:has-siblings:adjoins-item,QTreeView::branch:!has-children:!has-siblings:adjoins-item {border-image:unset}QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:closed:has-children:has-siblings {border-image:unset;}QTreeView::branch:has-children:!has-siblings:closed:disabled,QTreeView::branch:closed:has-children:has-siblings:disabled {}QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:open:has-children:has-siblings {border-image:unset;}QTreeView::branch:open:has-children:!has-siblings:disabled,QTreeView::branch:open:has-children:has-siblings:disabled {}QTreeView > QHeaderView {background:rgba(32, 33, 36, 1.000)}QTreeView > QHeaderView::section {background:rgba(63, 64, 66, 1.000)}QListView::left-arrow {margin:-2px;}QListView::right-arrow {margin:-2px;}QListView::left-arrow:selected:enabled {}QListView::right-arrow:selected:enabled {}QListView::left-arrow:disabled {}QListView::right-arrow:disabled {}QColumnView {background:rgba(32, 33, 36, 1.000)}QColumnViewGrip {margin:-4px;background:rgba(32, 33, 36, 1.000);}QColumnViewGrip:disabled {}QTableView {gridline-color:rgba(63, 64, 66, 1.000);background:rgba(16, 16, 18, 1.000); }QTableView:!active { selection-background-color:rgba(210, 227, 252, 0.180);}QTableView::item:alternate { background:rgba(255, 255, 255, 0.082);}QTableView::item:selected { background:rgba(66, 136, 242, 0.550);}QTableView QTableCornerButton::section {margin:0 1px 1px 0;background:rgba(63, 64, 66, 1.000);border-top-left-radius:2px}QTableView QTableCornerButton::section:pressed {background:rgba(66, 136, 242, 0.550)}QTableView > QHeaderView {background:rgba(16, 16, 18, 1.000);border-radius:3}QTableView > QHeaderView::section {background:rgba(63, 64, 66, 1.000)}QHeaderView {margin:0;border:none}QHeaderView::section {border:none;background:rgba(63, 64, 66, 1.000);padding-left:4px}QHeaderView::section:horizontal {margin-right:1px}QHeaderView::section:vertical {margin-bottom:1px}QHeaderView::section:on:enabled,QHeaderView::section:on:pressed {color:rgba(138, 180, 247, 1.000)}QHeaderView::section:last,QHeaderView::section:only-one {margin:0}QHeaderView::down-arrow:horizontal {margin-left:-19px;subcontrol-position:center right;}QHeaderView::down-arrow:horizontal:disabled {}QHeaderView::up-arrow:horizontal {margin-left:-19px;subcontrol-position:center right;}QHeaderView::up-arrow:horizontal:disabled {}QHeaderView::down-arrow:vertical,QHeaderView::up-arrow:vertical {width:0;height:0}QCalendarWidget > .QWidget {background:rgba(16, 16, 18, 1.000);border-bottom:1px solid rgba(63, 64, 66, 1.000);border-top-left-radius:4px;border-top-right-radius:4px}QCalendarWidget > .QWidget > QWidget {padding:1px}QCalendarWidget .QWidget > QToolButton {border-radius:4px}QCalendarWidget > QTableView {margin:0;border:none;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;alternate-background-color:rgba(255, 255, 255, 0.082); selection-background-color:rgba(66, 136, 242, 0.550);}QLineEdit,QAbstractSpinBox {padding:3px 4px;min-height:1em;border:1px solid rgba(63, 64, 66, 1.000);background:rgba(63, 64, 66, 1.000);border-radius:4px}QLineEdit:focus,QAbstractSpinBox:focus {border-color:rgba(138, 180, 247, 1.000)}QAbstractSpinBox::up-button,QAbstractSpinBox::down-button {subcontrol-position:center right;border-radius:4px}QAbstractSpinBox::up-button:hover:on,QAbstractSpinBox::down-button:hover:on {background:rgba(255, 255, 255, 0.145)}QAbstractSpinBox::up-button {bottom:5px;right:4px}QAbstractSpinBox::up-arrow:on {}QAbstractSpinBox::up-arrow:disabled,QAbstractSpinBox::up-arrow:off {}QAbstractSpinBox::down-button {top:5px;right:4px}QAbstractSpinBox::down-arrow:on {}QAbstractSpinBox::down-arrow:disabled,QAbstractSpinBox::down-arrow:off {}QDateTimeEdit::drop-down {padding-right:4px;width:16px;}QDateTimeEdit::drop-down:disabled {}QDateTimeEdit::down-arrow[calendarPopup=true] {image:none}QFileDialog QFrame {border:none}QFontDialog QListView {min-height:60px}QComboBox::indicator,QMenu::indicator {width:18px;height:18px}QMenu::indicator {background:rgba(255, 255, 255, 0.098);margin-left:3px;border-radius:4px}QComboBox::indicator:checked,QMenu::indicator:checked {}QCheckBox,QRadioButton {spacing:8px}QGroupBox::title,QAbstractItemView::item {spacing:6px}QCheckBox::indicator,QGroupBox::indicator,QAbstractItemView::indicator,QRadioButton::indicator {height:18px;width:18px}QCheckBox::indicator,QGroupBox::indicator,QAbstractItemView::indicator {}QCheckBox::indicator:unchecked:disabled,QGroupBox::indicator:unchecked:disabled,QAbstractItemView::indicator:unchecked:disabled {}QCheckBox::indicator:checked,QGroupBox::indicator:checked,QAbstractItemView::indicator:checked {}QCheckBox::indicator:checked:disabled,QGroupBox::indicator:checked:disabled,QAbstractItemView::indicator:checked:disabled {}QCheckBox::indicator:indeterminate,QAbstractItemView::indicator:indeterminate {}QCheckBox::indicator:indeterminate:disabled,QAbstractItemView::indicator:indeterminate:disabled {}QRadioButton::indicator:unchecked:disabled {}QRadioButton::indicator:checked {}QRadioButton::indicator:checked:disabled {}PlotWidget {padding:0}ParameterTree > .QWidget > .QWidget > .QWidget > QComboBox{min-height:1.2em}ParameterTree::item,ParameterTree > .QWidget {background:rgba(32, 33, 36, 1.000)} \ No newline at end of file diff --git a/LunaTranslator/files/themes/dark2.py b/LunaTranslator/files/themes/dark2.py new file mode 100644 index 00000000..16946865 --- /dev/null +++ b/LunaTranslator/files/themes/dark2.py @@ -0,0 +1,4 @@ +import qdarkstyle + +def stylesheet(): + return qdarkstyle.load_stylesheet(palette=qdarkstyle.DarkPalette) \ No newline at end of file diff --git a/LunaTranslator/files/themes/dark2.qss b/LunaTranslator/files/themes/dark2.qss deleted file mode 100644 index 52490a63..00000000 --- a/LunaTranslator/files/themes/dark2.qss +++ /dev/null @@ -1,2221 +0,0 @@ -/* --------------------------------------------------------------------------- - - WARNING! File created programmatically. All changes made in this file will be lost! - - Created by the qtsass compiler v0.4.0 - - The definitions are in the "qdarkstyle.qss._styles.scss" module - ---------------------------------------------------------------------------- */ -/* Light Style - QDarkStyleSheet ------------------------------------------ */ -/* - -See Qt documentation: - - - https://doc.qt.io/qt-5/stylesheet.html - - https://doc.qt.io/qt-5/stylesheet-reference.html - - https://doc.qt.io/qt-5/stylesheet-examples.html - ---------------------------------------------------------------------------- */ -/* Reset elements ------------------------------------------------------------ - -Resetting everything helps to unify styles across different operating systems - ---------------------------------------------------------------------------- */ -* { - padding: 0px; - margin: 0px; - border: 0px; - border-style: none; - border-image: none; - outline: 0; -} - -/* specific reset for elements inside QToolBar */ -QToolBar * { - margin: 0px; - padding: 0px; -} - -/* QWidget ---------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QWidget { - background-color: #19232D; - border: 0px solid #455364; - padding: 0px; - color: #DFE1E2; - selection-background-color: #346792; - selection-color: #DFE1E2; -} - -QWidget:disabled { - background-color: #19232D; - color: #788D9C; - selection-background-color: #26486B; - selection-color: #788D9C; -} - -QWidget::item:selected { - background-color: #346792; -} - -QWidget::item:hover:!selected { - background-color: #1A72BB; -} - -/* QMainWindow ------------------------------------------------------------ - -This adjusts the splitter in the dock widget, not qsplitter -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmainwindow - ---------------------------------------------------------------------------- */ -QMainWindow::separator { - background-color: #455364; - border: 0px solid #19232D; - spacing: 0px; - padding: 2px; -} - -QMainWindow::separator:hover { - background-color: #60798B; - border: 0px solid #1A72BB; -} - -QMainWindow::separator:horizontal { - width: 5px; - margin-top: 2px; - margin-bottom: 2px; - image: url(":/qss_icons/dark/rc/toolbar_separator_vertical.png"); -} - -QMainWindow::separator:vertical { - height: 5px; - margin-left: 2px; - margin-right: 2px; - image: url(":/qss_icons/dark/rc/toolbar_separator_horizontal.png"); -} - -/* QToolTip --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtooltip - ---------------------------------------------------------------------------- */ -QToolTip { - background-color: #346792; - color: #DFE1E2; - /* If you remove the border property, background stops working on Windows */ - border: none; - /* Remove padding, for fix combo box tooltip */ - padding: 0px; - /* Remove opacity, fix #174 - may need to use RGBA */ -} - -/* QStatusBar ------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qstatusbar - ---------------------------------------------------------------------------- */ -QStatusBar { - border: 1px solid #455364; - /* Fixes Spyder #9120, #9121 */ - background: #455364; - /* Fixes #205, white vertical borders separating items */ -} - -QStatusBar::item { - border: none; -} - -QStatusBar QToolTip { - background-color: #1A72BB; - border: 1px solid #19232D; - color: #19232D; - /* Remove padding, for fix combo box tooltip */ - padding: 0px; - /* Reducing transparency to read better */ - opacity: 230; -} - -QStatusBar QLabel { - /* Fixes Spyder #9120, #9121 */ - background: transparent; -} - -/* QCheckBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckbox - ---------------------------------------------------------------------------- */ -QCheckBox { - background-color: #19232D; - color: #DFE1E2; - spacing: 4px; - outline: none; - padding-top: 4px; - padding-bottom: 4px; -} - -QCheckBox:focus { - border: none; -} - -QCheckBox QWidget:disabled { - background-color: #19232D; - color: #788D9C; -} - -QCheckBox::indicator { - margin-left: 2px; - height: 14px; - width: 14px; -} - -QCheckBox::indicator:unchecked { - image: url(":/qss_icons/dark/rc/checkbox_unchecked.png"); -} - -QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_unchecked_focus.png"); -} - -QCheckBox::indicator:unchecked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_unchecked_disabled.png"); -} - -QCheckBox::indicator:checked { - image: url(":/qss_icons/dark/rc/checkbox_checked.png"); -} - -QCheckBox::indicator:checked:hover, QCheckBox::indicator:checked:focus, QCheckBox::indicator:checked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_checked_focus.png"); -} - -QCheckBox::indicator:checked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_checked_disabled.png"); -} - -QCheckBox::indicator:indeterminate { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate.png"); -} - -QCheckBox::indicator:indeterminate:disabled { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate_disabled.png"); -} - -QCheckBox::indicator:indeterminate:focus, QCheckBox::indicator:indeterminate:hover, QCheckBox::indicator:indeterminate:pressed { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate_focus.png"); -} - -/* QGroupBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qgroupbox - ---------------------------------------------------------------------------- */ -QGroupBox { - font-weight: bold; - border: 1px solid #455364; - border-radius: 4px; - padding: 2px; - margin-top: 6px; - margin-bottom: 4px; -} - -QGroupBox::title { - subcontrol-origin: margin; - subcontrol-position: top left; - left: 4px; - padding-left: 2px; - padding-right: 4px; - padding-top: -4px; -} - -QGroupBox::indicator { - margin-left: 2px; - margin-top: 2px; - padding: 0; - height: 14px; - width: 14px; -} - -QGroupBox::indicator:unchecked { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_unchecked.png"); -} - -QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:focus, QGroupBox::indicator:unchecked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_unchecked_focus.png"); -} - -QGroupBox::indicator:unchecked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_unchecked_disabled.png"); -} - -QGroupBox::indicator:checked { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_checked.png"); -} - -QGroupBox::indicator:checked:hover, QGroupBox::indicator:checked:focus, QGroupBox::indicator:checked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_checked_focus.png"); -} - -QGroupBox::indicator:checked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_checked_disabled.png"); -} - -/* QRadioButton ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qradiobutton - ---------------------------------------------------------------------------- */ -QRadioButton { - background-color: #19232D; - color: #DFE1E2; - spacing: 4px; - padding-top: 4px; - padding-bottom: 4px; - border: none; - outline: none; -} - -QRadioButton:focus { - border: none; -} - -QRadioButton:disabled { - background-color: #19232D; - color: #788D9C; - border: none; - outline: none; -} - -QRadioButton QWidget { - background-color: #19232D; - color: #DFE1E2; - spacing: 0px; - padding: 0px; - outline: none; - border: none; -} - -QRadioButton::indicator { - border: none; - outline: none; - margin-left: 2px; - height: 14px; - width: 14px; -} - -QRadioButton::indicator:unchecked { - image: url(":/qss_icons/dark/rc/radio_unchecked.png"); -} - -QRadioButton::indicator:unchecked:hover, QRadioButton::indicator:unchecked:focus, QRadioButton::indicator:unchecked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_unchecked_focus.png"); -} - -QRadioButton::indicator:unchecked:disabled { - image: url(":/qss_icons/dark/rc/radio_unchecked_disabled.png"); -} - -QRadioButton::indicator:checked { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked.png"); -} - -QRadioButton::indicator:checked:hover, QRadioButton::indicator:checked:focus, QRadioButton::indicator:checked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked_focus.png"); -} - -QRadioButton::indicator:checked:disabled { - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked_disabled.png"); -} - -/* QMenuBar --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmenubar - ---------------------------------------------------------------------------- */ -QMenuBar { - background-color: #455364; - padding: 2px; - border: 1px solid #19232D; - color: #DFE1E2; - selection-background-color: #1A72BB; -} - -QMenuBar:focus { - border: 1px solid #346792; -} - -QMenuBar::item { - background: transparent; - padding: 4px; -} - -QMenuBar::item:selected { - padding: 4px; - background: transparent; - border: 0px solid #455364; - background-color: #1A72BB; -} - -QMenuBar::item:pressed { - padding: 4px; - border: 0px solid #455364; - background-color: #1A72BB; - color: #DFE1E2; - margin-bottom: 0px; - padding-bottom: 0px; -} - -/* QMenu ------------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmenu - ---------------------------------------------------------------------------- */ -QMenu { - border: 0px solid #455364; - color: #DFE1E2; - margin: 0px; - background-color: #37414F; - selection-background-color: #1A72BB; -} - -QMenu::separator { - height: 1px; - background-color: #60798B; - color: #DFE1E2; -} - -QMenu::item { - background-color: #37414F; - padding: 4px 24px 4px 28px; - /* Reserve space for selection border */ - border: 1px transparent #455364; -} - -QMenu::item:selected { - color: #DFE1E2; - background-color: #1A72BB; -} - -QMenu::item:pressed { - background-color: #1A72BB; -} - -QMenu::icon { - padding-left: 10px; - width: 14px; - height: 14px; -} - -QMenu::indicator { - padding-left: 8px; - width: 12px; - height: 12px; - /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */ - /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ -} - -QMenu::indicator:non-exclusive:unchecked { - image: url(":/qss_icons/dark/rc/checkbox_unchecked.png"); -} - -QMenu::indicator:non-exclusive:unchecked:hover, QMenu::indicator:non-exclusive:unchecked:focus, QMenu::indicator:non-exclusive:unchecked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_unchecked_focus.png"); -} - -QMenu::indicator:non-exclusive:unchecked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_unchecked_disabled.png"); -} - -QMenu::indicator:non-exclusive:checked { - image: url(":/qss_icons/dark/rc/checkbox_checked.png"); -} - -QMenu::indicator:non-exclusive:checked:hover, QMenu::indicator:non-exclusive:checked:focus, QMenu::indicator:non-exclusive:checked:pressed { - border: none; - image: url(":/qss_icons/dark/rc/checkbox_checked_focus.png"); -} - -QMenu::indicator:non-exclusive:checked:disabled { - image: url(":/qss_icons/dark/rc/checkbox_checked_disabled.png"); -} - -QMenu::indicator:non-exclusive:indeterminate { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate.png"); -} - -QMenu::indicator:non-exclusive:indeterminate:disabled { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate_disabled.png"); -} - -QMenu::indicator:non-exclusive:indeterminate:focus, QMenu::indicator:non-exclusive:indeterminate:hover, QMenu::indicator:non-exclusive:indeterminate:pressed { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate_focus.png"); -} - -QMenu::indicator:exclusive:unchecked { - image: url(":/qss_icons/dark/rc/radio_unchecked.png"); -} - -QMenu::indicator:exclusive:unchecked:hover, QMenu::indicator:exclusive:unchecked:focus, QMenu::indicator:exclusive:unchecked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_unchecked_focus.png"); -} - -QMenu::indicator:exclusive:unchecked:disabled { - image: url(":/qss_icons/dark/rc/radio_unchecked_disabled.png"); -} - -QMenu::indicator:exclusive:checked { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked.png"); -} - -QMenu::indicator:exclusive:checked:hover, QMenu::indicator:exclusive:checked:focus, QMenu::indicator:exclusive:checked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked_focus.png"); -} - -QMenu::indicator:exclusive:checked:disabled { - outline: none; - image: url(":/qss_icons/dark/rc/radio_checked_disabled.png"); -} - -QMenu::right-arrow { - margin: 5px; - padding-left: 12px; - image: url(":/qss_icons/dark/rc/arrow_right.png"); - height: 12px; - width: 12px; -} - -/* QAbstractItemView ------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcombobox - ---------------------------------------------------------------------------- */ -QAbstractItemView { - alternate-background-color: #19232D; - color: #DFE1E2; - border: 1px solid #455364; - border-radius: 4px; -} - -QAbstractItemView QLineEdit { - padding: 2px; -} - -/* QAbstractScrollArea ---------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qabstractscrollarea - ---------------------------------------------------------------------------- */ -QAbstractScrollArea { - background-color: #19232D; - border: 1px solid #455364; - border-radius: 4px; - /* fix #159 */ - padding: 2px; - /* remove min-height to fix #244 */ - color: #DFE1E2; -} - -QAbstractScrollArea:disabled { - color: #788D9C; -} - -/* QScrollArea ------------------------------------------------------------ - ---------------------------------------------------------------------------- */ -QScrollArea QWidget QWidget:disabled { - background-color: #19232D; -} - -/* QScrollBar ------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qscrollbar - ---------------------------------------------------------------------------- */ -QScrollBar:horizontal { - height: 16px; - margin: 2px 16px 2px 16px; - border: 1px solid #455364; - border-radius: 4px; - background-color: #19232D; -} - -QScrollBar:vertical { - background-color: #19232D; - width: 16px; - margin: 16px 2px 16px 2px; - border: 1px solid #455364; - border-radius: 4px; -} - -QScrollBar::handle:horizontal { - background-color: #60798B; - border: 1px solid #455364; - border-radius: 4px; - min-width: 8px; -} - -QScrollBar::handle:horizontal:hover { - background-color: #346792; - border: #346792; - border-radius: 4px; - min-width: 8px; -} - -QScrollBar::handle:horizontal:focus { - border: 1px solid #1A72BB; -} - -QScrollBar::handle:vertical { - background-color: #60798B; - border: 1px solid #455364; - min-height: 8px; - border-radius: 4px; -} - -QScrollBar::handle:vertical:hover { - background-color: #346792; - border: #346792; - border-radius: 4px; - min-height: 8px; -} - -QScrollBar::handle:vertical:focus { - border: 1px solid #1A72BB; -} - -QScrollBar::add-line:horizontal { - margin: 0px 0px 0px 0px; - border-image: url(":/qss_icons/dark/rc/arrow_right_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::add-line:horizontal:hover, QScrollBar::add-line:horizontal:on { - border-image: url(":/qss_icons/dark/rc/arrow_right.png"); - height: 12px; - width: 12px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::add-line:vertical { - margin: 3px 0px 3px 0px; - border-image: url(":/qss_icons/dark/rc/arrow_down_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} - -QScrollBar::add-line:vertical:hover, QScrollBar::add-line:vertical:on { - border-image: url(":/qss_icons/dark/rc/arrow_down.png"); - height: 12px; - width: 12px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal { - margin: 0px 3px 0px 3px; - border-image: url(":/qss_icons/dark/rc/arrow_left_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal:hover, QScrollBar::sub-line:horizontal:on { - border-image: url(":/qss_icons/dark/rc/arrow_left.png"); - height: 12px; - width: 12px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:vertical { - margin: 3px 0px 3px 0px; - border-image: url(":/qss_icons/dark/rc/arrow_up_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: top; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:vertical:hover, QScrollBar::sub-line:vertical:on { - border-image: url(":/qss_icons/dark/rc/arrow_up.png"); - height: 12px; - width: 12px; - subcontrol-position: top; - subcontrol-origin: margin; -} - -QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { - background: none; -} - -QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { - background: none; -} - -QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { - background: none; -} - -QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { - background: none; -} - -/* QTextEdit -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-specific-widgets - ---------------------------------------------------------------------------- */ -QTextEdit { - background-color: #19232D; - color: #DFE1E2; - border-radius: 4px; - border: 1px solid #455364; -} - -QTextEdit:focus { - border: 1px solid #1A72BB; -} - -QTextEdit:selected { - background: #346792; - color: #455364; -} - -/* QPlainTextEdit --------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QPlainTextEdit { - background-color: #19232D; - color: #DFE1E2; - border-radius: 4px; - border: 1px solid #455364; -} - -QPlainTextEdit:focus { - border: 1px solid #1A72BB; -} - -QPlainTextEdit:selected { - background: #346792; - color: #455364; -} - -/* QSizeGrip -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qsizegrip - ---------------------------------------------------------------------------- */ -QSizeGrip { - background: transparent; - width: 12px; - height: 12px; - image: url(":/qss_icons/dark/rc/window_grip.png"); -} - -/* QStackedWidget --------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QStackedWidget { - padding: 2px; - border: 1px solid #455364; - border: 1px solid #19232D; -} - -/* QToolBar --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbar - ---------------------------------------------------------------------------- */ -QToolBar { - background-color: #455364; - border-bottom: 1px solid #19232D; - padding: 1px; - font-weight: bold; - spacing: 2px; -} - -QToolBar:disabled { - /* Fixes #272 */ - background-color: #455364; -} - -QToolBar::handle:horizontal { - width: 16px; - image: url(":/qss_icons/dark/rc/toolbar_move_horizontal.png"); -} - -QToolBar::handle:vertical { - height: 16px; - image: url(":/qss_icons/dark/rc/toolbar_move_vertical.png"); -} - -QToolBar::separator:horizontal { - width: 16px; - image: url(":/qss_icons/dark/rc/toolbar_separator_horizontal.png"); -} - -QToolBar::separator:vertical { - height: 16px; - image: url(":/qss_icons/dark/rc/toolbar_separator_vertical.png"); -} - -QToolButton#qt_toolbar_ext_button { - background: #455364; - border: 0px; - color: #DFE1E2; - image: url(":/qss_icons/dark/rc/arrow_right.png"); -} - -/* QAbstractSpinBox ------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QAbstractSpinBox { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - /* This fixes 103, 111 */ - padding-top: 2px; - /* This fixes 103, 111 */ - padding-bottom: 2px; - padding-left: 4px; - padding-right: 4px; - border-radius: 4px; - /* min-width: 5px; removed to fix 109 */ -} - -QAbstractSpinBox:up-button { - background-color: transparent #19232D; - subcontrol-origin: border; - subcontrol-position: top right; - border-left: 1px solid #455364; - border-bottom: 1px solid #455364; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - margin: 1px; - width: 12px; - margin-bottom: -1px; -} - -QAbstractSpinBox::up-arrow, QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::up-arrow:off { - image: url(":/qss_icons/dark/rc/arrow_up_disabled.png"); - height: 8px; - width: 8px; -} - -QAbstractSpinBox::up-arrow:hover { - image: url(":/qss_icons/dark/rc/arrow_up.png"); -} - -QAbstractSpinBox:down-button { - background-color: transparent #19232D; - subcontrol-origin: border; - subcontrol-position: bottom right; - border-left: 1px solid #455364; - border-top: 1px solid #455364; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - margin: 1px; - width: 12px; - margin-top: -1px; -} - -QAbstractSpinBox::down-arrow, QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::down-arrow:off { - image: url(":/qss_icons/dark/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QAbstractSpinBox::down-arrow:hover { - image: url(":/qss_icons/dark/rc/arrow_down.png"); -} - -QAbstractSpinBox:hover { - border: 1px solid #346792; - color: #DFE1E2; -} - -QAbstractSpinBox:focus { - border: 1px solid #1A72BB; -} - -QAbstractSpinBox:selected { - background: #346792; - color: #455364; -} - -/* ------------------------------------------------------------------------ */ -/* DISPLAYS --------------------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QLabel ----------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe - ---------------------------------------------------------------------------- */ -QLabel { - background-color: #19232D; - border: 0px solid #455364; - padding: 2px; - margin: 0px; - color: #DFE1E2; -} - -QLabel:disabled { - background-color: #19232D; - border: 0px solid #455364; - color: #788D9C; -} - -/* QTextBrowser ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qabstractscrollarea - ---------------------------------------------------------------------------- */ -QTextBrowser { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - border-radius: 4px; -} - -QTextBrowser:disabled { - background-color: #19232D; - border: 1px solid #455364; - color: #788D9C; - border-radius: 4px; -} - -QTextBrowser:hover, QTextBrowser:!hover, QTextBrowser:selected, QTextBrowser:pressed { - border: 1px solid #455364; -} - -/* QGraphicsView ---------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QGraphicsView { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - border-radius: 4px; -} - -QGraphicsView:disabled { - background-color: #19232D; - border: 1px solid #455364; - color: #788D9C; - border-radius: 4px; -} - -QGraphicsView:hover, QGraphicsView:!hover, QGraphicsView:selected, QGraphicsView:pressed { - border: 1px solid #455364; -} - -/* QCalendarWidget -------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QCalendarWidget { - border: 1px solid #455364; - border-radius: 4px; -} - -QCalendarWidget:disabled { - background-color: #19232D; - color: #788D9C; -} - -/* QLCDNumber ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QLCDNumber { - background-color: #19232D; - color: #DFE1E2; -} - -QLCDNumber:disabled { - background-color: #19232D; - color: #788D9C; -} - -/* QProgressBar ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qprogressbar - ---------------------------------------------------------------------------- */ -QProgressBar { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - border-radius: 4px; - text-align: center; -} - -QProgressBar:disabled { - background-color: #19232D; - border: 1px solid #455364; - color: #788D9C; - border-radius: 4px; - text-align: center; -} - -QProgressBar::chunk { - background-color: #346792; - color: #19232D; - border-radius: 4px; -} - -QProgressBar::chunk:disabled { - background-color: #26486B; - color: #788D9C; - border-radius: 4px; -} - -/* ------------------------------------------------------------------------ */ -/* BUTTONS ---------------------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QPushButton ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qpushbutton - ---------------------------------------------------------------------------- */ -QPushButton { - background-color: #455364; - color: #DFE1E2; - border-radius: 4px; - padding: 2px; - outline: none; - border: none; -} - -QPushButton:disabled { - background-color: #455364; - color: #788D9C; - border-radius: 4px; - padding: 2px; -} - -QPushButton:checked { - background-color: #60798B; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QPushButton:checked:disabled { - background-color: #60798B; - color: #788D9C; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QPushButton:checked:selected { - background: #60798B; -} - -QPushButton:hover { - background-color: #54687A; - color: #DFE1E2; -} - -QPushButton:pressed { - background-color: #60798B; -} - -QPushButton:selected { - background: #60798B; - color: #DFE1E2; -} - -QPushButton::menu-indicator { - subcontrol-origin: padding; - subcontrol-position: bottom right; - bottom: 4px; -} - -QDialogButtonBox QPushButton { - /* Issue #194 #248 - Special case of QPushButton inside dialogs, for better UI */ - min-width: 80px; -} - -/* QToolButton ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbutton - ---------------------------------------------------------------------------- */ -QToolButton { - background-color: #455364; - color: #DFE1E2; - border-radius: 4px; - padding: 2px; - outline: none; - border: none; - /* The subcontrols below are used only in the DelayedPopup mode */ - /* The subcontrols below are used only in the MenuButtonPopup mode */ - /* The subcontrol below is used only in the InstantPopup or DelayedPopup mode */ -} - -QToolButton:disabled { - background-color: #455364; - color: #788D9C; - border-radius: 4px; - padding: 2px; -} - -QToolButton:checked { - background-color: #60798B; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QToolButton:checked:disabled { - background-color: #60798B; - color: #788D9C; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QToolButton:checked:hover { - background-color: #54687A; - color: #DFE1E2; -} - -QToolButton:checked:pressed { - background-color: #60798B; -} - -QToolButton:checked:selected { - background: #60798B; - color: #DFE1E2; -} - -QToolButton:hover { - background-color: #54687A; - color: #DFE1E2; -} - -QToolButton:pressed { - background-color: #60798B; -} - -QToolButton:selected { - background: #60798B; - color: #DFE1E2; -} - -QToolButton[popupMode="0"] { - /* Only for DelayedPopup */ - padding-right: 2px; -} - -QToolButton[popupMode="1"] { - /* Only for MenuButtonPopup */ - padding-right: 20px; -} - -QToolButton[popupMode="1"]::menu-button { - border: none; -} - -QToolButton[popupMode="1"]::menu-button:hover { - border: none; - border-left: 1px solid #455364; - border-radius: 0; -} - -QToolButton[popupMode="2"] { - /* Only for InstantPopup */ - padding-right: 2px; -} - -QToolButton::menu-button { - padding: 2px; - border-radius: 4px; - width: 12px; - border: none; - outline: none; -} - -QToolButton::menu-button:hover { - border: 1px solid #346792; -} - -QToolButton::menu-button:checked:hover { - border: 1px solid #346792; -} - -QToolButton::menu-indicator { - image: url(":/qss_icons/dark/rc/arrow_down.png"); - height: 8px; - width: 8px; - top: 0; - /* Exclude a shift for better image */ - left: -2px; - /* Shift it a bit */ -} - -QToolButton::menu-arrow { - image: url(":/qss_icons/dark/rc/arrow_down.png"); - height: 8px; - width: 8px; -} - -QToolButton::menu-arrow:hover { - image: url(":/qss_icons/dark/rc/arrow_down_focus.png"); -} - -/* QCommandLinkButton ----------------------------------------------------- - ---------------------------------------------------------------------------- */ -QCommandLinkButton { - background-color: transparent; - border: 1px solid #455364; - color: #DFE1E2; - border-radius: 4px; - padding: 0px; - margin: 0px; -} - -QCommandLinkButton:disabled { - background-color: transparent; - color: #788D9C; -} - -/* ------------------------------------------------------------------------ */ -/* INPUTS - NO FIELDS ----------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QComboBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcombobox - ---------------------------------------------------------------------------- */ -QComboBox { - border: 1px solid #455364; - border-radius: 4px; - selection-background-color: #346792; - padding-left: 4px; - padding-right: 4px; - /* padding-right = 36; 4 + 16*2 See scrollbar size */ - /* changed to 4px to fix #239 */ - /* Fixes #103, #111 */ - min-height: 1.5em; - /* padding-top: 2px; removed to fix #132 */ - /* padding-bottom: 2px; removed to fix #132 */ - /* min-width: 75px; removed to fix #109 */ - /* Needed to remove indicator - fix #132 */ -} - -QComboBox QAbstractItemView { - border: 1px solid #455364; - border-radius: 0; - background-color: #19232D; - selection-background-color: #346792; -} - -QComboBox QAbstractItemView:hover { - background-color: #19232D; - color: #DFE1E2; -} - -QComboBox QAbstractItemView:selected { - background: #346792; - color: #455364; -} - -QComboBox QAbstractItemView:alternate { - background: #19232D; -} - -QComboBox:disabled { - background-color: #19232D; - color: #788D9C; -} - -QComboBox:hover { - border: 1px solid #346792; -} - -QComboBox:focus { - border: 1px solid #1A72BB; -} - -QComboBox:on { - selection-background-color: #346792; -} - -QComboBox::indicator { - border: none; - border-radius: 0; - background-color: transparent; - selection-background-color: transparent; - color: transparent; - selection-color: transparent; - /* Needed to remove indicator - fix #132 */ -} - -QComboBox::indicator:alternate { - background: #19232D; -} - -QComboBox::item { - /* Remove to fix #282, #285 and MR #288*/ - /*&:checked { - font-weight: bold; - } - - &:selected { - border: 0px solid transparent; - } - */ -} - -QComboBox::item:alternate { - background: #19232D; -} - -QComboBox::drop-down { - subcontrol-origin: padding; - subcontrol-position: top right; - width: 12px; - border-left: 1px solid #455364; -} - -QComboBox::down-arrow { - image: url(":/qss_icons/dark/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QComboBox::down-arrow:on, QComboBox::down-arrow:hover, QComboBox::down-arrow:focus { - image: url(":/qss_icons/dark/rc/arrow_down.png"); -} - -/* QSlider ---------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qslider - ---------------------------------------------------------------------------- */ -QSlider:disabled { - background: #19232D; -} - -QSlider:focus { - border: none; -} - -QSlider::groove:horizontal { - background: #455364; - border: 1px solid #455364; - height: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::groove:vertical { - background: #455364; - border: 1px solid #455364; - width: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::add-page:vertical { - background: #346792; - border: 1px solid #455364; - width: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::add-page:vertical :disabled { - background: #26486B; -} - -QSlider::sub-page:horizontal { - background: #346792; - border: 1px solid #455364; - height: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::sub-page:horizontal:disabled { - background: #26486B; -} - -QSlider::handle:horizontal { - background: #9DA9B5; - border: 1px solid #455364; - width: 8px; - height: 8px; - margin: -8px 0px; - border-radius: 4px; -} - -QSlider::handle:horizontal:hover { - background: #346792; - border: 1px solid #346792; -} - -QSlider::handle:horizontal:focus { - border: 1px solid #1A72BB; -} - -QSlider::handle:vertical { - background: #9DA9B5; - border: 1px solid #455364; - width: 8px; - height: 8px; - margin: 0 -8px; - border-radius: 4px; -} - -QSlider::handle:vertical:hover { - background: #346792; - border: 1px solid #346792; -} - -QSlider::handle:vertical:focus { - border: 1px solid #1A72BB; -} - -/* QLineEdit -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlineedit - ---------------------------------------------------------------------------- */ -QLineEdit { - background-color: #19232D; - padding-top: 2px; - /* This QLineEdit fix 103, 111 */ - padding-bottom: 2px; - /* This QLineEdit fix 103, 111 */ - padding-left: 4px; - padding-right: 4px; - border-style: solid; - border: 1px solid #455364; - border-radius: 4px; - color: #DFE1E2; -} - -QLineEdit:disabled { - background-color: #19232D; - color: #788D9C; -} - -QLineEdit:hover { - border: 1px solid #346792; - color: #DFE1E2; -} - -QLineEdit:focus { - border: 1px solid #1A72BB; -} - -QLineEdit:selected { - background-color: #346792; - color: #455364; -} - -/* QTabWiget -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar - ---------------------------------------------------------------------------- */ -QTabWidget { - padding: 2px; - selection-background-color: #455364; -} - -QTabWidget QWidget { - /* Fixes #189 */ - border-radius: 4px; -} - -QTabWidget::pane { - border: 1px solid #455364; - border-radius: 4px; - margin: 0px; - /* Fixes double border inside pane with pyqt5 */ - padding: 0px; -} - -QTabWidget::pane:selected { - background-color: #455364; - border: 1px solid #346792; -} - -/* QTabBar ---------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar - ---------------------------------------------------------------------------- */ -QTabBar, QDockWidget QTabBar { - qproperty-drawBase: 0; - border-radius: 4px; - margin: 0px; - padding: 2px; - border: 0; - /* left: 5px; move to the right by 5px - removed for fix */ -} - -QTabBar::close-button, QDockWidget QTabBar::close-button { - border: 0; - margin: 0; - padding: 4px; - image: url(":/qss_icons/dark/rc/window_close.png"); -} - -QTabBar::close-button:hover, QDockWidget QTabBar::close-button:hover { - image: url(":/qss_icons/dark/rc/window_close_focus.png"); -} - -QTabBar::close-button:pressed, QDockWidget QTabBar::close-button:pressed { - image: url(":/qss_icons/dark/rc/window_close_pressed.png"); -} - -QTabBar::tab, QDockWidget QTabBar::tab { - /* !selected and disabled ----------------------------------------- */ - /* selected ------------------------------------------------------- */ -} - -QTabBar::tab:top:selected:disabled, QDockWidget QTabBar::tab:top:selected:disabled { - border-bottom: 3px solid #26486B; - color: #788D9C; - background-color: #455364; -} - -QTabBar::tab:bottom:selected:disabled, QDockWidget QTabBar::tab:bottom:selected:disabled { - border-top: 3px solid #26486B; - color: #788D9C; - background-color: #455364; -} - -QTabBar::tab:left:selected:disabled, QDockWidget QTabBar::tab:left:selected:disabled { - border-right: 3px solid #26486B; - color: #788D9C; - background-color: #455364; -} - -QTabBar::tab:right:selected:disabled, QDockWidget QTabBar::tab:right:selected:disabled { - border-left: 3px solid #26486B; - color: #788D9C; - background-color: #455364; -} - -QTabBar::tab:top:!selected:disabled, QDockWidget QTabBar::tab:top:!selected:disabled { - border-bottom: 3px solid #19232D; - color: #788D9C; - background-color: #19232D; -} - -QTabBar::tab:bottom:!selected:disabled, QDockWidget QTabBar::tab:bottom:!selected:disabled { - border-top: 3px solid #19232D; - color: #788D9C; - background-color: #19232D; -} - -QTabBar::tab:left:!selected:disabled, QDockWidget QTabBar::tab:left:!selected:disabled { - border-right: 3px solid #19232D; - color: #788D9C; - background-color: #19232D; -} - -QTabBar::tab:right:!selected:disabled, QDockWidget QTabBar::tab:right:!selected:disabled { - border-left: 3px solid #19232D; - color: #788D9C; - background-color: #19232D; -} - -QTabBar::tab:top:!selected, QDockWidget QTabBar::tab:top:!selected { - border-bottom: 2px solid #19232D; - margin-top: 2px; -} - -QTabBar::tab:bottom:!selected, QDockWidget QTabBar::tab:bottom:!selected { - border-top: 2px solid #19232D; - margin-bottom: 2px; -} - -QTabBar::tab:left:!selected, QDockWidget QTabBar::tab:left:!selected { - border-left: 2px solid #19232D; - margin-right: 2px; -} - -QTabBar::tab:right:!selected, QDockWidget QTabBar::tab:right:!selected { - border-right: 2px solid #19232D; - margin-left: 2px; -} - -QTabBar::tab:top, QDockWidget QTabBar::tab:top { - background-color: #455364; - margin-left: 2px; - padding-left: 4px; - padding-right: 4px; - padding-top: 2px; - padding-bottom: 2px; - min-width: 5px; - border-bottom: 3px solid #455364; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QTabBar::tab:top:selected, QDockWidget QTabBar::tab:top:selected { - background-color: #54687A; - border-bottom: 3px solid #259AE9; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QTabBar::tab:top:!selected:hover, QDockWidget QTabBar::tab:top:!selected:hover { - border: 1px solid #1A72BB; - border-bottom: 3px solid #1A72BB; - /* Fixes spyder-ide/spyder#9766 and #243 */ - padding-left: 3px; - padding-right: 3px; -} - -QTabBar::tab:bottom, QDockWidget QTabBar::tab:bottom { - border-top: 3px solid #455364; - background-color: #455364; - margin-left: 2px; - padding-left: 4px; - padding-right: 4px; - padding-top: 2px; - padding-bottom: 2px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - min-width: 5px; -} - -QTabBar::tab:bottom:selected, QDockWidget QTabBar::tab:bottom:selected { - background-color: #54687A; - border-top: 3px solid #259AE9; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} - -QTabBar::tab:bottom:!selected:hover, QDockWidget QTabBar::tab:bottom:!selected:hover { - border: 1px solid #1A72BB; - border-top: 3px solid #1A72BB; - /* Fixes spyder-ide/spyder#9766 and #243 */ - padding-left: 3px; - padding-right: 3px; -} - -QTabBar::tab:left, QDockWidget QTabBar::tab:left { - background-color: #455364; - margin-top: 2px; - padding-left: 2px; - padding-right: 2px; - padding-top: 4px; - padding-bottom: 4px; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - min-height: 5px; -} - -QTabBar::tab:left:selected, QDockWidget QTabBar::tab:left:selected { - background-color: #54687A; - border-right: 3px solid #259AE9; -} - -QTabBar::tab:left:!selected:hover, QDockWidget QTabBar::tab:left:!selected:hover { - border: 1px solid #1A72BB; - border-right: 3px solid #1A72BB; - /* Fixes different behavior #271 */ - margin-right: 0px; - padding-right: -1px; -} - -QTabBar::tab:right, QDockWidget QTabBar::tab:right { - background-color: #455364; - margin-top: 2px; - padding-left: 2px; - padding-right: 2px; - padding-top: 4px; - padding-bottom: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - min-height: 5px; -} - -QTabBar::tab:right:selected, QDockWidget QTabBar::tab:right:selected { - background-color: #54687A; - border-left: 3px solid #259AE9; -} - -QTabBar::tab:right:!selected:hover, QDockWidget QTabBar::tab:right:!selected:hover { - border: 1px solid #1A72BB; - border-left: 3px solid #1A72BB; - /* Fixes different behavior #271 */ - margin-left: 0px; - padding-left: 0px; -} - -QTabBar QToolButton, QDockWidget QTabBar QToolButton { - /* Fixes #136 */ - background-color: #455364; - height: 12px; - width: 12px; -} - -QTabBar QToolButton:pressed, QDockWidget QTabBar QToolButton:pressed { - background-color: #455364; -} - -QTabBar QToolButton:pressed:hover, QDockWidget QTabBar QToolButton:pressed:hover { - border: 1px solid #346792; -} - -QTabBar QToolButton::left-arrow:enabled, QDockWidget QTabBar QToolButton::left-arrow:enabled { - image: url(":/qss_icons/dark/rc/arrow_left.png"); -} - -QTabBar QToolButton::left-arrow:disabled, QDockWidget QTabBar QToolButton::left-arrow:disabled { - image: url(":/qss_icons/dark/rc/arrow_left_disabled.png"); -} - -QTabBar QToolButton::right-arrow:enabled, QDockWidget QTabBar QToolButton::right-arrow:enabled { - image: url(":/qss_icons/dark/rc/arrow_right.png"); -} - -QTabBar QToolButton::right-arrow:disabled, QDockWidget QTabBar QToolButton::right-arrow:disabled { - image: url(":/qss_icons/dark/rc/arrow_right_disabled.png"); -} - -/* QDockWiget ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QDockWidget { - outline: 1px solid #455364; - background-color: #19232D; - border: 1px solid #455364; - border-radius: 4px; - titlebar-close-icon: url(":/qss_icons/dark/rc/transparent.png"); - titlebar-normal-icon: url(":/qss_icons/dark/rc/transparent.png"); -} - -QDockWidget::title { - /* Better size for title bar */ - padding: 3px; - spacing: 4px; - border: none; - background-color: #455364; -} - -QDockWidget::close-button { - icon-size: 12px; - border: none; - background: transparent; - background-image: transparent; - border: 0; - margin: 0; - padding: 0; - image: url(":/qss_icons/dark/rc/window_close.png"); -} - -QDockWidget::close-button:hover { - image: url(":/qss_icons/dark/rc/window_close_focus.png"); -} - -QDockWidget::close-button:pressed { - image: url(":/qss_icons/dark/rc/window_close_pressed.png"); -} - -QDockWidget::float-button { - icon-size: 12px; - border: none; - background: transparent; - background-image: transparent; - border: 0; - margin: 0; - padding: 0; - image: url(":/qss_icons/dark/rc/window_undock.png"); -} - -QDockWidget::float-button:hover { - image: url(":/qss_icons/dark/rc/window_undock_focus.png"); -} - -QDockWidget::float-button:pressed { - image: url(":/qss_icons/dark/rc/window_undock_pressed.png"); -} - -/* QTreeView QListView QTableView ----------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlistview -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtableview - ---------------------------------------------------------------------------- */ -QTreeView:branch:selected, QTreeView:branch:hover { - background: url(":/qss_icons/dark/rc/transparent.png"); -} - -QTreeView:branch:has-siblings:!adjoins-item { - border-image: url(":/qss_icons/dark/rc/branch_line.png") 0; -} - -QTreeView:branch:has-siblings:adjoins-item { - border-image: url(":/qss_icons/dark/rc/branch_more.png") 0; -} - -QTreeView:branch:!has-children:!has-siblings:adjoins-item { - border-image: url(":/qss_icons/dark/rc/branch_end.png") 0; -} - -QTreeView:branch:has-children:!has-siblings:closed, QTreeView:branch:closed:has-children:has-siblings { - border-image: none; - image: url(":/qss_icons/dark/rc/branch_closed.png"); -} - -QTreeView:branch:open:has-children:!has-siblings, QTreeView:branch:open:has-children:has-siblings { - border-image: none; - image: url(":/qss_icons/dark/rc/branch_open.png"); -} - -QTreeView:branch:has-children:!has-siblings:closed:hover, QTreeView:branch:closed:has-children:has-siblings:hover { - image: url(":/qss_icons/dark/rc/branch_closed_focus.png"); -} - -QTreeView:branch:open:has-children:!has-siblings:hover, QTreeView:branch:open:has-children:has-siblings:hover { - image: url(":/qss_icons/dark/rc/branch_open_focus.png"); -} - -QTreeView::indicator:checked, -QListView::indicator:checked, -QTableView::indicator:checked, -QColumnView::indicator:checked { - image: url(":/qss_icons/dark/rc/checkbox_checked.png"); -} - -QTreeView::indicator:checked:hover, QTreeView::indicator:checked:focus, QTreeView::indicator:checked:pressed, -QListView::indicator:checked:hover, -QListView::indicator:checked:focus, -QListView::indicator:checked:pressed, -QTableView::indicator:checked:hover, -QTableView::indicator:checked:focus, -QTableView::indicator:checked:pressed, -QColumnView::indicator:checked:hover, -QColumnView::indicator:checked:focus, -QColumnView::indicator:checked:pressed { - image: url(":/qss_icons/dark/rc/checkbox_checked_focus.png"); -} - -QTreeView::indicator:unchecked, -QListView::indicator:unchecked, -QTableView::indicator:unchecked, -QColumnView::indicator:unchecked { - image: url(":/qss_icons/dark/rc/checkbox_unchecked.png"); -} - -QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:focus, QTreeView::indicator:unchecked:pressed, -QListView::indicator:unchecked:hover, -QListView::indicator:unchecked:focus, -QListView::indicator:unchecked:pressed, -QTableView::indicator:unchecked:hover, -QTableView::indicator:unchecked:focus, -QTableView::indicator:unchecked:pressed, -QColumnView::indicator:unchecked:hover, -QColumnView::indicator:unchecked:focus, -QColumnView::indicator:unchecked:pressed { - image: url(":/qss_icons/dark/rc/checkbox_unchecked_focus.png"); -} - -QTreeView::indicator:indeterminate, -QListView::indicator:indeterminate, -QTableView::indicator:indeterminate, -QColumnView::indicator:indeterminate { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate.png"); -} - -QTreeView::indicator:indeterminate:hover, QTreeView::indicator:indeterminate:focus, QTreeView::indicator:indeterminate:pressed, -QListView::indicator:indeterminate:hover, -QListView::indicator:indeterminate:focus, -QListView::indicator:indeterminate:pressed, -QTableView::indicator:indeterminate:hover, -QTableView::indicator:indeterminate:focus, -QTableView::indicator:indeterminate:pressed, -QColumnView::indicator:indeterminate:hover, -QColumnView::indicator:indeterminate:focus, -QColumnView::indicator:indeterminate:pressed { - image: url(":/qss_icons/dark/rc/checkbox_indeterminate_focus.png"); -} - -QTreeView, -QListView, -QTableView, -QColumnView { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - gridline-color: #455364; - border-radius: 4px; -} - -QTreeView:disabled, -QListView:disabled, -QTableView:disabled, -QColumnView:disabled { - background-color: #19232D; - color: #788D9C; -} - -QTreeView:selected, -QListView:selected, -QTableView:selected, -QColumnView:selected { - background-color: #346792; - color: #455364; -} - -QTreeView:focus, -QListView:focus, -QTableView:focus, -QColumnView:focus { - border: 1px solid #1A72BB; -} - -QTreeView::item:pressed, -QListView::item:pressed, -QTableView::item:pressed, -QColumnView::item:pressed { - background-color: #346792; -} - -QTreeView::item:selected:active, -QListView::item:selected:active, -QTableView::item:selected:active, -QColumnView::item:selected:active { - background-color: #346792; -} - -QTreeView::item:selected:!active, -QListView::item:selected:!active, -QTableView::item:selected:!active, -QColumnView::item:selected:!active { - color: #DFE1E2; - background-color: #37414F; -} - -QTreeView::item:!selected:hover, -QListView::item:!selected:hover, -QTableView::item:!selected:hover, -QColumnView::item:!selected:hover { - outline: 0; - color: #DFE1E2; - background-color: #37414F; -} - -QTableCornerButton::section { - background-color: #19232D; - border: 1px transparent #455364; - border-radius: 0px; -} - -/* QHeaderView ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qheaderview - ---------------------------------------------------------------------------- */ -QHeaderView { - background-color: #455364; - border: 0px transparent #455364; - padding: 0; - margin: 0; - border-radius: 0; -} - -QHeaderView:disabled { - background-color: #455364; - border: 1px transparent #455364; -} - -QHeaderView::section { - background-color: #455364; - color: #DFE1E2; - border-radius: 0; - text-align: left; - font-size: 13px; -} - -QHeaderView::section::horizontal { - padding-top: 0; - padding-bottom: 0; - padding-left: 4px; - padding-right: 4px; - border-left: 1px solid #19232D; -} - -QHeaderView::section::horizontal::first, QHeaderView::section::horizontal::only-one { - border-left: 1px solid #455364; -} - -QHeaderView::section::horizontal:disabled { - color: #788D9C; -} - -QHeaderView::section::vertical { - padding-top: 0; - padding-bottom: 0; - padding-left: 4px; - padding-right: 4px; - border-top: 1px solid #19232D; -} - -QHeaderView::section::vertical::first, QHeaderView::section::vertical::only-one { - border-top: 1px solid #455364; -} - -QHeaderView::section::vertical:disabled { - color: #788D9C; -} - -QHeaderView::down-arrow { - /* Those settings (border/width/height/background-color) solve bug */ - /* transparent arrow background and size */ - background-color: #455364; - border: none; - height: 12px; - width: 12px; - padding-left: 2px; - padding-right: 2px; - image: url(":/qss_icons/dark/rc/arrow_down.png"); -} - -QHeaderView::up-arrow { - background-color: #455364; - border: none; - height: 12px; - width: 12px; - padding-left: 2px; - padding-right: 2px; - image: url(":/qss_icons/dark/rc/arrow_up.png"); -} - -/* QToolBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbox - ---------------------------------------------------------------------------- */ -QToolBox { - padding: 0px; - border: 0px; - border: 1px solid #455364; -} - -QToolBox:selected { - padding: 0px; - border: 2px solid #346792; -} - -QToolBox::tab { - background-color: #19232D; - border: 1px solid #455364; - color: #DFE1E2; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QToolBox::tab:disabled { - color: #788D9C; -} - -QToolBox::tab:selected { - background-color: #60798B; - border-bottom: 2px solid #346792; -} - -QToolBox::tab:selected:disabled { - background-color: #455364; - border-bottom: 2px solid #26486B; -} - -QToolBox::tab:!selected { - background-color: #455364; - border-bottom: 2px solid #455364; -} - -QToolBox::tab:!selected:disabled { - background-color: #19232D; -} - -QToolBox::tab:hover { - border-color: #1A72BB; - border-bottom: 2px solid #1A72BB; -} - -QToolBox QScrollArea { - padding: 0px; - border: 0px; - background-color: #19232D; -} - -/* QFrame ----------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe -https://doc.qt.io/qt-5/qframe.html#-prop -https://doc.qt.io/qt-5/qframe.html#details -https://stackoverflow.com/questions/14581498/qt-stylesheet-for-hline-vline-color - ---------------------------------------------------------------------------- */ -/* (dot) .QFrame fix #141, #126, #123 */ -.QFrame { - border-radius: 4px; - border: 1px solid #455364; - /* No frame */ - /* HLine */ - /* HLine */ -} - -.QFrame[frameShape="0"] { - border-radius: 4px; - border: 1px transparent #455364; -} - -.QFrame[frameShape="4"] { - max-height: 2px; - border: none; - background-color: #455364; -} - -.QFrame[frameShape="5"] { - max-width: 2px; - border: none; - background-color: #455364; -} - -/* QSplitter -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qsplitter - ---------------------------------------------------------------------------- */ -QSplitter { - background-color: #455364; - spacing: 0px; - padding: 0px; - margin: 0px; -} - -QSplitter::handle { - background-color: #455364; - border: 0px solid #19232D; - spacing: 0px; - padding: 1px; - margin: 0px; -} - -QSplitter::handle:hover { - background-color: #9DA9B5; -} - -QSplitter::handle:horizontal { - width: 5px; - image: url(":/qss_icons/dark/rc/line_vertical.png"); -} - -QSplitter::handle:vertical { - height: 5px; - image: url(":/qss_icons/dark/rc/line_horizontal.png"); -} - -/* QDateEdit, QDateTimeEdit ----------------------------------------------- - ---------------------------------------------------------------------------- */ -QDateEdit, QDateTimeEdit { - selection-background-color: #346792; - border-style: solid; - border: 1px solid #455364; - border-radius: 4px; - /* This fixes 103, 111 */ - padding-top: 2px; - /* This fixes 103, 111 */ - padding-bottom: 2px; - padding-left: 4px; - padding-right: 4px; - min-width: 10px; -} - -QDateEdit:on, QDateTimeEdit:on { - selection-background-color: #346792; -} - -QDateEdit::drop-down, QDateTimeEdit::drop-down { - subcontrol-origin: padding; - subcontrol-position: top right; - width: 12px; - border-left: 1px solid #455364; -} - -QDateEdit::down-arrow, QDateTimeEdit::down-arrow { - image: url(":/qss_icons/dark/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QDateEdit::down-arrow:on, QDateEdit::down-arrow:hover, QDateEdit::down-arrow:focus, QDateTimeEdit::down-arrow:on, QDateTimeEdit::down-arrow:hover, QDateTimeEdit::down-arrow:focus { - image: url(":/qss_icons/dark/rc/arrow_down.png"); -} - -QDateEdit QAbstractItemView, QDateTimeEdit QAbstractItemView { - background-color: #19232D; - border-radius: 4px; - border: 1px solid #455364; - selection-background-color: #346792; -} - -/* QAbstractView ---------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QAbstractView:hover { - border: 1px solid #346792; - color: #DFE1E2; -} - -QAbstractView:selected { - background: #346792; - color: #455364; -} - -/* PlotWidget ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -PlotWidget { - /* Fix cut labels in plots #134 */ - padding: 0px; -} - - QMenu::item { - padding: 4px 24px 4px 6px; - } - \ No newline at end of file diff --git a/LunaTranslator/files/themes/light1.py b/LunaTranslator/files/themes/light1.py new file mode 100644 index 00000000..8ebc695f --- /dev/null +++ b/LunaTranslator/files/themes/light1.py @@ -0,0 +1,3 @@ +import qdarktheme +def stylesheet(): + return qdarktheme.load_stylesheet(theme='light') \ No newline at end of file diff --git a/LunaTranslator/files/themes/light1.qss b/LunaTranslator/files/themes/light1.qss deleted file mode 100644 index efda890b..00000000 --- a/LunaTranslator/files/themes/light1.qss +++ /dev/null @@ -1 +0,0 @@ -QWidget {background:rgba(248, 249, 250, 1.000);color:rgba(77, 81, 87, 1.000);selection-color:rgba(77, 81, 87, 1.000);selection-background-color:rgba(97, 158, 239, 0.500)}QWidget:disabled {color:rgba(77, 81, 87, 0.400);selection-background-color:rgba(77, 81, 87, 0.250);selection-color:rgba(77, 81, 87, 0.400)}QWidget:focus {outline:none}QCheckBox:!window,QRadioButton:!window,QPushButton:!window,QLabel:!window,QLCDNumber:!window {background:transparent}QMdiSubWindow > QCheckBox:!window,QMdiSubWindow > QRadioButton:!window,QMdiSubWindow > QPushButton:!window,QMdiSubWindow > QLabel:!window,QMdiSubWindow > QLCDNumber:!window {background:rgba(248, 249, 250, 1.000)}QMainWindow::separator {width:4px;height:4px;background:rgba(218, 220, 224, 1.000)}QMainWindow::separator:hover,QMainWindow::separator:pressed {background:rgba(26, 115, 232, 1.000)}QToolTip {background:rgba(255, 255, 255, 1.000);color:rgba(77, 81, 87, 1.000)}QSizeGrip {width:0;height:0;image:none}QStatusBar {background:rgba(223, 225, 229, 1.000)}QStatusBar::item {border:none}QStatusBar QWidget {background:transparent;padding:3px;border-radius:4px}QStatusBar > .QSizeGrip {padding:0}QStatusBar QWidget:hover {background:rgba(0, 0, 0, 0.082)}QStatusBar QWidget:pressed,QStatusBar QWidget:checked {background:rgba(0, 0, 0, 0.141)}QCheckBox,QRadioButton {border-top:2px solid transparent;border-bottom:2px solid transparent}QCheckBox:hover,QRadioButton:hover {border-bottom:2px solid rgba(26, 115, 232, 1.000)}QGroupBox {font-weight:bold;margin-top:8px;padding:2px 1px 1px 1px;border-radius:4px;border:1px solid rgba(218, 220, 224, 1.000)}QGroupBox::title {subcontrol-origin:margin;subcontrol-position:top left;left:7px;margin:0 2px 0 3px}QGroupBox:flat {border-color:transparent}QMenuBar {padding:2px;border-bottom:1px solid rgba(218, 220, 224, 1.000);background:rgba(248, 249, 250, 1.000)}QMenuBar::item {background:transparent;padding:4px}QMenuBar::item:selected {padding:4px;border-radius:4px;background:rgba(0, 0, 0, 0.125)}QMenuBar::item:pressed {padding:4px;margin-bottom:0;padding-bottom:0}QToolBar {padding:1px;font-weight:bold;spacing:2px;margin:1px;background:rgba(235, 235, 235, 1.000);border-style:none}QToolBar::handle:horizontal {width:20px;}QToolBar::handle:vertical {height:20px;}QToolBar::handle:horizontal:disabled {}QToolBar::handle:vertical:disabled {}QToolBar::separator {background:rgba(218, 220, 224, 1.000)}QToolBar::separator:horizontal {width:2px;margin:0 6px}QToolBar::separator:vertical {height:2px;margin:6px 0}QToolBar > QToolButton {background:transparent;padding:3px;border-radius:4px}QToolBar > QToolButton:hover,QToolBar > QToolButton::menu-button:hover {background:rgba(0, 0, 0, 0.082)}QToolBar > QToolButton::menu-button {border-top-right-radius:4px;border-bottom-right-radius:4px}QToolBar > QToolButton:pressed,QToolBar > QToolButton::menu-button:pressed:enabled,QToolBar > QToolButton:checked:enabled {background:rgba(0, 0, 0, 0.141)}QToolBar > QWidget {background:transparent}QMenu {background:rgba(255, 255, 255, 1.000);padding:8px 0; }QMenu::separator {margin:4px 0;height:1px;background:rgba(218, 220, 224, 1.000)}QMenu::item {padding:4px 19px}QMenu::item:selected {background:rgba(0, 0, 0, 0.133)}QMenu::icon {padding-left:10px;width:14px;height:14px}QMenu::right-arrow {margin:2px;padding-left:12px;height:20px;width:20px;}QMenu::right-arrow:disabled {}QScrollBar {background:rgba(0, 0, 0, 0.063);border-radius:4px;}QScrollBar:horizontal {height:14px;}QScrollBar:vertical {width:14px;}QScrollBar::handle {background:rgba(0, 0, 0, 0.251);border-radius:3px}QScrollBar::handle:hover {background:rgba(0, 0, 0, 0.314)}QScrollBar::handle:pressed {background:rgba(0, 0, 0, 0.376)}QScrollBar::handle:disabled {background:rgba(0, 0, 0, 0.082)}QScrollBar::handle:horizontal {min-width:8px;margin:4px 14px;}QScrollBar::handle:horizontal:hover {margin:2px 14px;}QScrollBar::handle:vertical {min-height:8px;margin:14px 4px;}QScrollBar::handle:vertical:hover {margin:14px 2px;}QScrollBar::sub-page,QScrollBar::add-page {background:transparent}QScrollBar::sub-line,QScrollBar::add-line {background:transparent;}QScrollBar::up-arrow:enabled {}QScrollBar::right-arrow:enabled {}QScrollBar::down-arrow:enabled {}QScrollBar::left-arrow:enabled {}QScrollBar::up-arrow:hover {}QScrollBar::right-arrow:hover {}QScrollBar::down-arrow:hover {}QScrollBar::left-arrow:hover {}QProgressBar {text-align:center;border:1px solid rgba(218, 220, 224, 1.000);border-radius:4px}QProgressBar::chunk {background:rgba(73, 144, 237, 1.000);border-radius:3px}QProgressBar::chunk:disabled {background:rgba(77, 81, 87, 0.250)}QPushButton {color:rgba(26, 115, 232, 1.000);border:1px solid rgba(218, 220, 224, 1.000);padding:4px 8px;border-radius:4px}QPushButton:flat,QPushButton:default {border:none;padding:5px 9px}QPushButton:default {color:rgba(248, 249, 250, 1.000);background:rgba(26, 115, 232, 1.000)}QPushButton:hover {background:rgba(23, 112, 227, 0.100)}QPushButton:pressed {background:rgba(23, 112, 227, 0.240)}QPushButton:checked:enabled {background:rgba(23, 112, 227, 0.240)}QPushButton:default:hover {background:rgba(50, 130, 234, 1.000)}QPushButton:default:pressed,QPushButton:default:checked {background:rgba(97, 158, 239, 1.000)}QPushButton:default:disabled,QPushButton:default:checked:disabled {background:rgba(77, 81, 87, 0.250)}QDialogButtonBox {dialogbuttonbox-buttons-have-icons:0}QDialogButtonBox QPushButton {min-width:65px}QToolButton {background:transparent;padding:5px;spacing:2px;border-radius:2px}QToolButton:hover,QToolButton::menu-button:hover {background:rgba(23, 112, 227, 0.100)}QToolButton:pressed,QToolButton:checked:pressed,QToolButton::menu-button:pressed:enabled {background:rgba(23, 112, 227, 0.240)}QToolButton:selected:enabled,QToolButton:checked:enabled {background:rgba(23, 112, 227, 0.240)}QToolButton::menu-indicator {height:18px;width:18px;top:6px;left:3px;}QToolButton::menu-indicator:disabled {}QToolButton::menu-arrow {image:unset}QToolButton::menu-button {subcontrol-origin:margin;width:17px;border-top-right-radius:2px;border-bottom-right-radius:2px;}QToolButton::menu-button:disabled {}QToolButton[popupMode="1"] {padding-right:1px;margin-right:18px;border-top-right-radius:0;border-bottom-right-radius:0}QComboBox {min-height:1.5em;padding:0 8px 0 4px;background:rgba(248, 249, 250, 1.000);border:1px solid rgba(218, 220, 224, 1.000);border-radius:4px}QComboBox:focus,QComboBox:open {border-color:rgba(26, 115, 232, 1.000)}QComboBox::drop-down {margin:2px 2px 2px -6px;border-radius:4}QComboBox::drop-down:editable:hover {background:rgba(0, 0, 0, 0.094)}QComboBox::down-arrow {}QComboBox::down-arrow:disabled {}QComboBox::down-arrow:editable:open {}QComboBox::down-arrow:editable:open:disabled {}QComboBox::item:selected {border:none;background:rgba(73, 144, 237, 0.350);border-radius:4px}QComboBox QListView[frameShape="0"] {margin:0;padding:4px;background:rgba(255, 255, 255, 1.000);selection-background-color:rgba(73, 144, 237, 0.350); border-radius:0; }QComboBox QListView::item {border-radius:4px}QSlider {padding:2px 0}QSlider::groove {border-radius:2px}QSlider::groove:horizontal {height:4px}QSlider::groove:vertical {width:4px}QSlider::sub-page:horizontal,QSlider::add-page:vertical,QSlider::handle {background:rgba(26, 115, 232, 1.000)}QSlider::sub-page:horizontal:disabled,QSlider::add-page:vertical:disabled,QSlider::handle:disabled {background:rgba(77, 81, 87, 0.250)}QSlider::add-page:horizontal,QSlider::sub-page:vertical {background:rgba(77, 81, 87, 0.200)}QSlider::handle:hover,QSlider::handle:pressed {background:rgba(73, 144, 237, 1.000)}QSlider::handle:horizontal {width:16px;height:8px;margin:-6px 0;border-radius:8px}QSlider::handle:vertical {width:8px;height:16px;margin:0 -6px;border-radius:8px}QTabWidget::pane {border:1px solid rgba(218, 220, 224, 1.000);border-radius:4px}QTabBar {qproperty-drawBase:0}QTabBar::close-button {}QTabBar::close-button:hover {background:rgba(0, 0, 0, 0.125);border-radius:4px}QTabBar::close-button:!selected {}QTabBar::close-button:disabled {}QTabBar::tab {padding:3px;border-style:solid}QTabBar::tab:hover,QTabBar::tab:selected:hover:enabled {background:rgba(0, 0, 0, 0.082)}QTabBar::tab:selected:enabled {color:rgba(26, 115, 232, 1.000);background:rgba(0, 0, 0, 0.000);border-color:rgba(26, 115, 232, 1.000)}QTabBar::tab:selected:disabled,QTabBar::tab:only-one:selected:enabled {border-color:rgba(218, 220, 224, 1.000)}QTabBar::tab:top {border-bottom-width:2px;margin:3px 6px 0 0;border-top-left-radius:2px;border-top-right-radius:2px}QTabBar::tab:bottom {border-top-width:2px;margin:0 6px 3px 0;border-bottom-left-radius:2px;border-bottom-right-radius:2px}QTabBar::tab:left {border-right-width:2px;margin:0 0 6px 3px;border-top-left-radius:2px;border-bottom-left-radius:2px}QTabBar::tab:right {border-left-width:2px;margin-bottom:6px;margin:0 3px 6px 0;border-top-right-radius:2px;border-bottom-right-radius:2px}QTabBar::tab:top:first,QTabBar::tab:top:only-one,QTabBar::tab:bottom:first,QTabBar::tab:bottom:only-one {margin-left:2px}QTabBar::tab:top:last,QTabBar::tab:top:only-one,QTabBar::tab:bottom:last,QTabBar::tab:bottom:only-one {margin-right:2px}QTabBar::tab:left:first,QTabBar::tab:left:only-one,QTabBar::tab:right:first,QTabBar::tab:right:only-one {margin-top:2px}QTabBar::tab:left:last,QTabBar::tab:left:only-one,QTabBar::tab:right:last,QTabBar::tab:right:only-one {margin-bottom:2px}QDockWidget {border:1px solid rgba(218, 220, 224, 1.000);border-radius:4px}QDockWidget::title {padding:3px;spacing:4px;background:rgba(236, 239, 242, 1.000)}QDockWidget::close-button,QDockWidget::float-button {border-radius:2px}QDockWidget::close-button:hover,QDockWidget::float-button:hover {background:rgba(23, 112, 227, 0.100)}QDockWidget::close-button:pressed,QDockWidget::float-button:pressed {background:rgba(23, 112, 227, 0.240)}QFrame {border:1px solid rgba(218, 220, 224, 1.000);padding:1px;border-radius:4px}.QFrame {padding:0}QFrame[frameShape="0"] {border-color:transparent;padding:0}.QFrame[frameShape="0"] {border:none}QFrame[frameShape="2"] {border-color:rgba(255, 255, 255, 1.000);background:rgba(255, 255, 255, 1.000)}QFrame[frameShape="4"] {max-height:2px;border:none;background:rgba(218, 220, 224, 1.000)}QFrame[frameShape="5"] {max-width:2px;border:none;background:rgba(218, 220, 224, 1.000)}QLCDNumber {min-width:2em;margin:2px}QToolBox::tab {background:rgba(236, 239, 242, 1.000);border-bottom:2px solid rgba(218, 220, 224, 1.000);border-top-left-radius:4px;border-top-right-radius:4px}QToolBox::tab:selected:enabled {border-bottom-color:rgba(26, 115, 232, 1.000)}QSplitter::handle {background:rgba(218, 220, 224, 1.000);margin:1px 3px}QSplitter::handle:hover {background:rgba(26, 115, 232, 1.000)}QSplitter::handle:horizontal {width:5px;}QSplitter::handle:horizontal:disabled {}QSplitter::handle:vertical {height:5px;}QSplitter::handle:vertical:disabled {}QSplitterHandle::item:hover {}QAbstractScrollArea {margin:1px}QAbstractScrollArea::corner {background:transparent}QAbstractScrollArea > .QWidget {background:transparent}QAbstractScrollArea > .QWidget > .QWidget {background:transparent}QMdiArea {qproperty-background:rgba(255, 255, 255, 1.000);border-radius:0}QMdiSubWindow {background:rgba(248, 249, 250, 1.000);border:1px solid;padding:0 3px}QMdiSubWindow > QWidget {border:1px solid rgba(218, 220, 224, 1.000)}QTextEdit, QPlainTextEdit {background:rgba(255, 255, 255, 1.000)}QTextEdit:focus,QTextEdit:selected,QPlainTextEdit:focus,QPlainTextEdit:selected {border:1px solid rgba(26, 115, 232, 1.000);selection-background-color:rgba(97, 158, 239, 0.500)}QTextEdit:!focus,QPlainTextEdit:!focus { selection-background-color:rgba(0, 0, 0, 0.082)}QTextEdit:!active,QPlainTextEdit:!active { }QAbstractItemView {padding:0;alternate-background-color:transparent;selection-background-color:transparent}QAbstractItemView:disabled {selection-background-color:transparent}QAbstractItemView::item:alternate,QAbstractItemView::branch:alternate {background:rgba(0, 0, 0, 0.035)}QAbstractItemView::item:selected,QAbstractItemView::branch:selected {background:rgba(73, 144, 237, 0.350)}QAbstractItemView::item:selected:!active,QAbstractItemView::branch:selected:!active {background:rgba(13, 65, 133, 0.090)}QAbstractItemView QLineEdit,QAbstractItemView QAbstractSpinBox,QAbstractItemView QAbstractButton {padding:0;margin:1px}QListView {padding:1px}QListView,QTreeView {background:rgba(248, 249, 250, 1.000)}QListView::item:!selected:hover,QTreeView::item:!selected:hover,QTreeView::branch:!selected:hover {background:rgba(0, 0, 0, 0.075)}QTreeView::branch:!selected:hover,QTreeView::branch:alternate,QTreeView::branch:selected,QTreeView::branch:selected:!active { }QTreeView::branch {border- 0}QTreeView::branch:active {border- 0}QTreeView::branch:has-siblings:adjoins-item,QTreeView::branch:!has-children:!has-siblings:adjoins-item {border-image:unset}QTreeView::branch:has-children:!has-siblings:closed,QTreeView::branch:closed:has-children:has-siblings {border-image:unset;}QTreeView::branch:has-children:!has-siblings:closed:disabled,QTreeView::branch:closed:has-children:has-siblings:disabled {}QTreeView::branch:open:has-children:!has-siblings,QTreeView::branch:open:has-children:has-siblings {border-image:unset;}QTreeView::branch:open:has-children:!has-siblings:disabled,QTreeView::branch:open:has-children:has-siblings:disabled {}QTreeView > QHeaderView {background:rgba(248, 249, 250, 1.000)}QTreeView > QHeaderView::section {background:rgba(218, 220, 224, 1.000)}QListView::left-arrow {margin:-2px;}QListView::right-arrow {margin:-2px;}QListView::left-arrow:selected:enabled {}QListView::right-arrow:selected:enabled {}QListView::left-arrow:disabled {}QListView::right-arrow:disabled {}QColumnView {background:rgba(248, 249, 250, 1.000)}QColumnViewGrip {margin:-4px;background:rgba(248, 249, 250, 1.000);}QColumnViewGrip:disabled {}QTableView {gridline-color:rgba(218, 220, 224, 1.000);background:rgba(255, 255, 255, 1.000); }QTableView:!active { selection-background-color:rgba(13, 65, 133, 0.090);}QTableView::item:alternate { background:rgba(0, 0, 0, 0.071);}QTableView::item:selected { background:rgba(50, 130, 234, 0.500);}QTableView QTableCornerButton::section {margin:0 1px 1px 0;background:rgba(218, 220, 224, 1.000);border-top-left-radius:2px}QTableView QTableCornerButton::section:pressed {background:rgba(50, 130, 234, 0.500)}QTableView > QHeaderView {background:rgba(255, 255, 255, 1.000);border-radius:3}QTableView > QHeaderView::section {background:rgba(218, 220, 224, 1.000)}QHeaderView {margin:0;border:none}QHeaderView::section {border:none;background:rgba(218, 220, 224, 1.000);padding-left:4px}QHeaderView::section:horizontal {margin-right:1px}QHeaderView::section:vertical {margin-bottom:1px}QHeaderView::section:on:enabled,QHeaderView::section:on:pressed {color:rgba(26, 115, 232, 1.000)}QHeaderView::section:last,QHeaderView::section:only-one {margin:0}QHeaderView::down-arrow:horizontal {margin-left:-19px;subcontrol-position:center right;}QHeaderView::down-arrow:horizontal:disabled {}QHeaderView::up-arrow:horizontal {margin-left:-19px;subcontrol-position:center right;}QHeaderView::up-arrow:horizontal:disabled {}QHeaderView::down-arrow:vertical,QHeaderView::up-arrow:vertical {width:0;height:0}QCalendarWidget > .QWidget {background:rgba(255, 255, 255, 1.000);border-bottom:1px solid rgba(218, 220, 224, 1.000);border-top-left-radius:4px;border-top-right-radius:4px}QCalendarWidget > .QWidget > QWidget {padding:1px}QCalendarWidget .QWidget > QToolButton {border-radius:4px}QCalendarWidget > QTableView {margin:0;border:none;border-radius:4px;border-top-left-radius:0;border-top-right-radius:0;alternate-background-color:rgba(0, 0, 0, 0.071); selection-background-color:rgba(50, 130, 234, 0.500);}QLineEdit,QAbstractSpinBox {padding:3px 4px;min-height:1em;border:1px solid rgba(218, 220, 224, 1.000);background:rgba(248, 249, 250, 1.000);border-radius:4px}QLineEdit:focus,QAbstractSpinBox:focus {border-color:rgba(26, 115, 232, 1.000)}QAbstractSpinBox::up-button,QAbstractSpinBox::down-button {subcontrol-position:center right;border-radius:4px}QAbstractSpinBox::up-button:hover:on,QAbstractSpinBox::down-button:hover:on {background:rgba(0, 0, 0, 0.094)}QAbstractSpinBox::up-button {bottom:5px;right:4px}QAbstractSpinBox::up-arrow:on {}QAbstractSpinBox::up-arrow:disabled,QAbstractSpinBox::up-arrow:off {}QAbstractSpinBox::down-button {top:5px;right:4px}QAbstractSpinBox::down-arrow:on {}QAbstractSpinBox::down-arrow:disabled,QAbstractSpinBox::down-arrow:off {}QDateTimeEdit::drop-down {padding-right:4px;width:16px;}QDateTimeEdit::drop-down:disabled {}QDateTimeEdit::down-arrow[calendarPopup=true] {image:none}QFileDialog QFrame {border:none}QFontDialog QListView {min-height:60px}QComboBox::indicator,QMenu::indicator {width:18px;height:18px}QMenu::indicator {background:rgba(0, 0, 0, 0.098);margin-left:3px;border-radius:4px}QComboBox::indicator:checked,QMenu::indicator:checked {}QCheckBox,QRadioButton {spacing:8px}QGroupBox::title,QAbstractItemView::item {spacing:6px}QCheckBox::indicator,QGroupBox::indicator,QAbstractItemView::indicator,QRadioButton::indicator {height:18px;width:18px}QCheckBox::indicator,QGroupBox::indicator,QAbstractItemView::indicator {}QCheckBox::indicator:unchecked:disabled,QGroupBox::indicator:unchecked:disabled,QAbstractItemView::indicator:unchecked:disabled {}QCheckBox::indicator:checked,QGroupBox::indicator:checked,QAbstractItemView::indicator:checked {}QCheckBox::indicator:checked:disabled,QGroupBox::indicator:checked:disabled,QAbstractItemView::indicator:checked:disabled {}QCheckBox::indicator:indeterminate,QAbstractItemView::indicator:indeterminate {}QCheckBox::indicator:indeterminate:disabled,QAbstractItemView::indicator:indeterminate:disabled {}QRadioButton::indicator:unchecked {}QRadioButton::indicator:unchecked:disabled {}QRadioButton::indicator:checked {}QRadioButton::indicator:checked:disabled {}PlotWidget {padding:0}ParameterTree > .QWidget > .QWidget > .QWidget > QComboBox{min-height:1.2em}ParameterTree::item,ParameterTree > .QWidget {background:rgba(248, 249, 250, 1.000)} \ No newline at end of file diff --git a/LunaTranslator/files/themes/light2.py b/LunaTranslator/files/themes/light2.py new file mode 100644 index 00000000..1cbfc026 --- /dev/null +++ b/LunaTranslator/files/themes/light2.py @@ -0,0 +1,4 @@ +import qdarkstyle + +def stylesheet(): + return qdarkstyle.load_stylesheet(palette=qdarkstyle.LightPalette) \ No newline at end of file diff --git a/LunaTranslator/files/themes/light2.qss b/LunaTranslator/files/themes/light2.qss deleted file mode 100644 index e83d3f23..00000000 --- a/LunaTranslator/files/themes/light2.qss +++ /dev/null @@ -1,2216 +0,0 @@ -/* --------------------------------------------------------------------------- - - WARNING! File created programmatically. All changes made in this file will be lost! - - Created by the qtsass compiler v0.4.0 - - The definitions are in the "qdarkstyle.qss._styles.scss" module - ---------------------------------------------------------------------------- */ -/* Dark Style - QDarkStyleSheet ------------------------------------------ */ -/* - -See Qt documentation: - - - https://doc.qt.io/qt-5/stylesheet.html - - https://doc.qt.io/qt-5/stylesheet-reference.html - - https://doc.qt.io/qt-5/stylesheet-examples.html - ---------------------------------------------------------------------------- */ -/* Reset elements ------------------------------------------------------------ - -Resetting everything helps to unify styles across different operating systems - ---------------------------------------------------------------------------- */ -* { - padding: 0px; - margin: 0px; - border: 0px; - border-style: none; - border-image: none; - outline: 0; -} - -/* specific reset for elements inside QToolBar */ -QToolBar * { - margin: 0px; - padding: 0px; -} - -/* QWidget ---------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QWidget { - background-color: #FAFAFA; - border: 0px solid #C0C4C8; - padding: 0px; - color: #19232D; - selection-background-color: #9FCBFF; - selection-color: #19232D; -} - -QWidget:disabled { - background-color: #FAFAFA; - color: #9DA9B5; - selection-background-color: #DAEDFF; - selection-color: #9DA9B5; -} - -QWidget::item:selected { - background-color: #9FCBFF; -} - -QWidget::item:hover:!selected { - background-color: #73C7FF; -} - -/* QMainWindow ------------------------------------------------------------ - -This adjusts the splitter in the dock widget, not qsplitter -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmainwindow - ---------------------------------------------------------------------------- */ -QMainWindow::separator { - background-color: #C0C4C8; - border: 0px solid #FAFAFA; - spacing: 0px; - padding: 2px; -} - -QMainWindow::separator:hover { - background-color: #ACB1B6; - border: 0px solid #73C7FF; -} - -QMainWindow::separator:horizontal { - width: 5px; - margin-top: 2px; - margin-bottom: 2px; - image: url(":/qss_icons/light/rc/toolbar_separator_vertical.png"); -} - -QMainWindow::separator:vertical { - height: 5px; - margin-left: 2px; - margin-right: 2px; - image: url(":/qss_icons/light/rc/toolbar_separator_horizontal.png"); -} - -/* QToolTip --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtooltip - ---------------------------------------------------------------------------- */ -QToolTip { - background-color: #9FCBFF; - color: #19232D; - /* If you remove the border property, background stops working on Windows */ - border: none; - /* Remove padding, for fix combo box tooltip */ - padding: 0px; - /* Remove opacity, fix #174 - may need to use RGBA */ -} - -/* QStatusBar ------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qstatusbar - ---------------------------------------------------------------------------- */ -QStatusBar { - border: 1px solid #C0C4C8; - /* Fixes Spyder #9120, #9121 */ - background: #C0C4C8; - /* Fixes #205, white vertical borders separating items */ -} - -QStatusBar::item { - border: none; -} - -QStatusBar QToolTip { - background-color: #73C7FF; - border: 1px solid #FAFAFA; - color: #FAFAFA; - /* Remove padding, for fix combo box tooltip */ - padding: 0px; - /* Reducing transparency to read better */ - opacity: 230; -} - -QStatusBar QLabel { - /* Fixes Spyder #9120, #9121 */ - background: transparent; -} - -/* QCheckBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckbox - ---------------------------------------------------------------------------- */ -QCheckBox { - background-color: #FAFAFA; - color: #19232D; - spacing: 4px; - outline: none; - padding-top: 4px; - padding-bottom: 4px; -} - -QCheckBox:focus { - border: none; -} - -QCheckBox QWidget:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -QCheckBox::indicator { - margin-left: 2px; - height: 14px; - width: 14px; -} - -QCheckBox::indicator:unchecked { - image: url(":/qss_icons/light/rc/checkbox_unchecked.png"); -} - -QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_unchecked_focus.png"); -} - -QCheckBox::indicator:unchecked:disabled { - image: url(":/qss_icons/light/rc/checkbox_unchecked_disabled.png"); -} - -QCheckBox::indicator:checked { - image: url(":/qss_icons/light/rc/checkbox_checked.png"); -} - -QCheckBox::indicator:checked:hover, QCheckBox::indicator:checked:focus, QCheckBox::indicator:checked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_checked_focus.png"); -} - -QCheckBox::indicator:checked:disabled { - image: url(":/qss_icons/light/rc/checkbox_checked_disabled.png"); -} - -QCheckBox::indicator:indeterminate { - image: url(":/qss_icons/light/rc/checkbox_indeterminate.png"); -} - -QCheckBox::indicator:indeterminate:disabled { - image: url(":/qss_icons/light/rc/checkbox_indeterminate_disabled.png"); -} - -QCheckBox::indicator:indeterminate:focus, QCheckBox::indicator:indeterminate:hover, QCheckBox::indicator:indeterminate:pressed { - image: url(":/qss_icons/light/rc/checkbox_indeterminate_focus.png"); -} - -/* QGroupBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qgroupbox - ---------------------------------------------------------------------------- */ -QGroupBox { - font-weight: bold; - border: 1px solid #C0C4C8; - border-radius: 4px; - padding: 2px; - margin-top: 6px; - margin-bottom: 4px; -} - -QGroupBox::title { - subcontrol-origin: margin; - subcontrol-position: top left; - left: 4px; - padding-left: 2px; - padding-right: 4px; - padding-top: -4px; -} - -QGroupBox::indicator { - margin-left: 2px; - margin-top: 2px; - padding: 0; - height: 14px; - width: 14px; -} - -QGroupBox::indicator:unchecked { - border: none; - image: url(":/qss_icons/light/rc/checkbox_unchecked.png"); -} - -QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:focus, QGroupBox::indicator:unchecked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_unchecked_focus.png"); -} - -QGroupBox::indicator:unchecked:disabled { - image: url(":/qss_icons/light/rc/checkbox_unchecked_disabled.png"); -} - -QGroupBox::indicator:checked { - border: none; - image: url(":/qss_icons/light/rc/checkbox_checked.png"); -} - -QGroupBox::indicator:checked:hover, QGroupBox::indicator:checked:focus, QGroupBox::indicator:checked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_checked_focus.png"); -} - -QGroupBox::indicator:checked:disabled { - image: url(":/qss_icons/light/rc/checkbox_checked_disabled.png"); -} - -/* QRadioButton ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qradiobutton - ---------------------------------------------------------------------------- */ -QRadioButton { - background-color: #FAFAFA; - color: #19232D; - spacing: 4px; - padding-top: 4px; - padding-bottom: 4px; - border: none; - outline: none; -} - -QRadioButton:focus { - border: none; -} - -QRadioButton:disabled { - background-color: #FAFAFA; - color: #9DA9B5; - border: none; - outline: none; -} - -QRadioButton QWidget { - background-color: #FAFAFA; - color: #19232D; - spacing: 0px; - padding: 0px; - outline: none; - border: none; -} - -QRadioButton::indicator { - border: none; - outline: none; - margin-left: 2px; - height: 14px; - width: 14px; -} - -QRadioButton::indicator:unchecked { - image: url(":/qss_icons/light/rc/radio_unchecked.png"); -} - -QRadioButton::indicator:unchecked:hover, QRadioButton::indicator:unchecked:focus, QRadioButton::indicator:unchecked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_unchecked_focus.png"); -} - -QRadioButton::indicator:unchecked:disabled { - image: url(":/qss_icons/light/rc/radio_unchecked_disabled.png"); -} - -QRadioButton::indicator:checked { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_checked.png"); -} - -QRadioButton::indicator:checked:hover, QRadioButton::indicator:checked:focus, QRadioButton::indicator:checked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_checked_focus.png"); -} - -QRadioButton::indicator:checked:disabled { - outline: none; - image: url(":/qss_icons/light/rc/radio_checked_disabled.png"); -} - -/* QMenuBar --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmenubar - ---------------------------------------------------------------------------- */ -QMenuBar { - background-color: #C0C4C8; - padding: 2px; - border: 1px solid #FAFAFA; - color: #19232D; - selection-background-color: #73C7FF; -} - -QMenuBar:focus { - border: 1px solid #9FCBFF; -} - -QMenuBar::item { - background: transparent; - padding: 4px; -} - -QMenuBar::item:selected { - padding: 4px; - background: transparent; - border: 0px solid #C0C4C8; - background-color: #73C7FF; -} - -QMenuBar::item:pressed { - padding: 4px; - border: 0px solid #C0C4C8; - background-color: #73C7FF; - color: #19232D; - margin-bottom: 0px; - padding-bottom: 0px; -} - -/* QMenu ------------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qmenu - ---------------------------------------------------------------------------- */ -QMenu { - border: 0px solid #C0C4C8; - color: #19232D; - margin: 0px; - background-color: #D2D5D8; - selection-background-color: #73C7FF; -} - -QMenu::separator { - height: 1px; - background-color: #ACB1B6; - color: #19232D; -} - -QMenu::item { - background-color: #D2D5D8; - padding: 4px 24px 4px 28px; - /* Reserve space for selection border */ - border: 1px transparent #C0C4C8; -} - -QMenu::item:selected { - color: #19232D; - background-color: #73C7FF; -} - -QMenu::item:pressed { - background-color: #73C7FF; -} - -QMenu::icon { - padding-left: 10px; - width: 14px; - height: 14px; -} - -QMenu::indicator { - padding-left: 8px; - width: 12px; - height: 12px; - /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */ - /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ -} - -QMenu::indicator:non-exclusive:unchecked { - image: url(":/qss_icons/light/rc/checkbox_unchecked.png"); -} - -QMenu::indicator:non-exclusive:unchecked:hover, QMenu::indicator:non-exclusive:unchecked:focus, QMenu::indicator:non-exclusive:unchecked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_unchecked_focus.png"); -} - -QMenu::indicator:non-exclusive:unchecked:disabled { - image: url(":/qss_icons/light/rc/checkbox_unchecked_disabled.png"); -} - -QMenu::indicator:non-exclusive:checked { - image: url(":/qss_icons/light/rc/checkbox_checked.png"); -} - -QMenu::indicator:non-exclusive:checked:hover, QMenu::indicator:non-exclusive:checked:focus, QMenu::indicator:non-exclusive:checked:pressed { - border: none; - image: url(":/qss_icons/light/rc/checkbox_checked_focus.png"); -} - -QMenu::indicator:non-exclusive:checked:disabled { - image: url(":/qss_icons/light/rc/checkbox_checked_disabled.png"); -} - -QMenu::indicator:non-exclusive:indeterminate { - image: url(":/qss_icons/light/rc/checkbox_indeterminate.png"); -} - -QMenu::indicator:non-exclusive:indeterminate:disabled { - image: url(":/qss_icons/light/rc/checkbox_indeterminate_disabled.png"); -} - -QMenu::indicator:non-exclusive:indeterminate:focus, QMenu::indicator:non-exclusive:indeterminate:hover, QMenu::indicator:non-exclusive:indeterminate:pressed { - image: url(":/qss_icons/light/rc/checkbox_indeterminate_focus.png"); -} - -QMenu::indicator:exclusive:unchecked { - image: url(":/qss_icons/light/rc/radio_unchecked.png"); -} - -QMenu::indicator:exclusive:unchecked:hover, QMenu::indicator:exclusive:unchecked:focus, QMenu::indicator:exclusive:unchecked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_unchecked_focus.png"); -} - -QMenu::indicator:exclusive:unchecked:disabled { - image: url(":/qss_icons/light/rc/radio_unchecked_disabled.png"); -} - -QMenu::indicator:exclusive:checked { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_checked.png"); -} - -QMenu::indicator:exclusive:checked:hover, QMenu::indicator:exclusive:checked:focus, QMenu::indicator:exclusive:checked:pressed { - border: none; - outline: none; - image: url(":/qss_icons/light/rc/radio_checked_focus.png"); -} - -QMenu::indicator:exclusive:checked:disabled { - outline: none; - image: url(":/qss_icons/light/rc/radio_checked_disabled.png"); -} - -QMenu::right-arrow { - margin: 5px; - padding-left: 12px; - image: url(":/qss_icons/light/rc/arrow_right.png"); - height: 12px; - width: 12px; -} - -/* QAbstractItemView ------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcombobox - ---------------------------------------------------------------------------- */ -QAbstractItemView { - alternate-background-color: #FAFAFA; - color: #19232D; - border: 1px solid #C0C4C8; - border-radius: 4px; -} - -QAbstractItemView QLineEdit { - padding: 2px; -} - -/* QAbstractScrollArea ---------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qabstractscrollarea - ---------------------------------------------------------------------------- */ -QAbstractScrollArea { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - border-radius: 4px; - /* fix #159 */ - padding: 2px; - /* remove min-height to fix #244 */ - color: #19232D; -} - -QAbstractScrollArea:disabled { - color: #9DA9B5; -} - -/* QScrollArea ------------------------------------------------------------ - ---------------------------------------------------------------------------- */ -QScrollArea QWidget QWidget:disabled { - background-color: #FAFAFA; -} - -/* QScrollBar ------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qscrollbar - ---------------------------------------------------------------------------- */ -QScrollBar:horizontal { - height: 16px; - margin: 2px 16px 2px 16px; - border: 1px solid #C0C4C8; - border-radius: 4px; - background-color: #FAFAFA; -} - -QScrollBar:vertical { - background-color: #FAFAFA; - width: 16px; - margin: 16px 2px 16px 2px; - border: 1px solid #C0C4C8; - border-radius: 4px; -} - -QScrollBar::handle:horizontal { - background-color: #ACB1B6; - border: 1px solid #C0C4C8; - border-radius: 4px; - min-width: 8px; -} - -QScrollBar::handle:horizontal:hover { - background-color: #9FCBFF; - border: #9FCBFF; - border-radius: 4px; - min-width: 8px; -} - -QScrollBar::handle:horizontal:focus { - border: 1px solid #73C7FF; -} - -QScrollBar::handle:vertical { - background-color: #ACB1B6; - border: 1px solid #C0C4C8; - min-height: 8px; - border-radius: 4px; -} - -QScrollBar::handle:vertical:hover { - background-color: #9FCBFF; - border: #9FCBFF; - border-radius: 4px; - min-height: 8px; -} - -QScrollBar::handle:vertical:focus { - border: 1px solid #73C7FF; -} - -QScrollBar::add-line:horizontal { - margin: 0px 0px 0px 0px; - border-image: url(":/qss_icons/light/rc/arrow_right_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::add-line:horizontal:hover, QScrollBar::add-line:horizontal:on { - border-image: url(":/qss_icons/light/rc/arrow_right.png"); - height: 12px; - width: 12px; - subcontrol-position: right; - subcontrol-origin: margin; -} - -QScrollBar::add-line:vertical { - margin: 3px 0px 3px 0px; - border-image: url(":/qss_icons/light/rc/arrow_down_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} - -QScrollBar::add-line:vertical:hover, QScrollBar::add-line:vertical:on { - border-image: url(":/qss_icons/light/rc/arrow_down.png"); - height: 12px; - width: 12px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal { - margin: 0px 3px 0px 3px; - border-image: url(":/qss_icons/light/rc/arrow_left_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:horizontal:hover, QScrollBar::sub-line:horizontal:on { - border-image: url(":/qss_icons/light/rc/arrow_left.png"); - height: 12px; - width: 12px; - subcontrol-position: left; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:vertical { - margin: 3px 0px 3px 0px; - border-image: url(":/qss_icons/light/rc/arrow_up_disabled.png"); - height: 12px; - width: 12px; - subcontrol-position: top; - subcontrol-origin: margin; -} - -QScrollBar::sub-line:vertical:hover, QScrollBar::sub-line:vertical:on { - border-image: url(":/qss_icons/light/rc/arrow_up.png"); - height: 12px; - width: 12px; - subcontrol-position: top; - subcontrol-origin: margin; -} - -QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal { - background: none; -} - -QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical { - background: none; -} - -QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { - background: none; -} - -QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { - background: none; -} - -/* QTextEdit -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-specific-widgets - ---------------------------------------------------------------------------- */ -QTextEdit { - background-color: #FAFAFA; - color: #19232D; - border-radius: 4px; - border: 1px solid #C0C4C8; -} - -QTextEdit:focus { - border: 1px solid #73C7FF; -} - -QTextEdit:selected { - background: #9FCBFF; - color: #C0C4C8; -} - -/* QPlainTextEdit --------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QPlainTextEdit { - background-color: #FAFAFA; - color: #19232D; - border-radius: 4px; - border: 1px solid #C0C4C8; -} - -QPlainTextEdit:focus { - border: 1px solid #73C7FF; -} - -QPlainTextEdit:selected { - background: #9FCBFF; - color: #C0C4C8; -} - -/* QSizeGrip -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qsizegrip - ---------------------------------------------------------------------------- */ -QSizeGrip { - background: transparent; - width: 12px; - height: 12px; - image: url(":/qss_icons/light/rc/window_grip.png"); -} - -/* QStackedWidget --------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QStackedWidget { - padding: 2px; - border: 1px solid #C0C4C8; - border: 1px solid #FAFAFA; -} - -/* QToolBar --------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbar - ---------------------------------------------------------------------------- */ -QToolBar { - background-color: #C0C4C8; - border-bottom: 1px solid #FAFAFA; - padding: 1px; - font-weight: bold; - spacing: 2px; -} - -QToolBar:disabled { - /* Fixes #272 */ - background-color: #C0C4C8; -} - -QToolBar::handle:horizontal { - width: 16px; - image: url(":/qss_icons/light/rc/toolbar_move_horizontal.png"); -} - -QToolBar::handle:vertical { - height: 16px; - image: url(":/qss_icons/light/rc/toolbar_move_vertical.png"); -} - -QToolBar::separator:horizontal { - width: 16px; - image: url(":/qss_icons/light/rc/toolbar_separator_horizontal.png"); -} - -QToolBar::separator:vertical { - height: 16px; - image: url(":/qss_icons/light/rc/toolbar_separator_vertical.png"); -} - -QToolButton#qt_toolbar_ext_button { - background: #C0C4C8; - border: 0px; - color: #19232D; - image: url(":/qss_icons/light/rc/arrow_right.png"); -} - -/* QAbstractSpinBox ------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QAbstractSpinBox { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - /* This fixes 103, 111 */ - padding-top: 2px; - /* This fixes 103, 111 */ - padding-bottom: 2px; - padding-left: 4px; - padding-right: 4px; - border-radius: 4px; - /* min-width: 5px; removed to fix 109 */ -} - -QAbstractSpinBox:up-button { - background-color: transparent #FAFAFA; - subcontrol-origin: border; - subcontrol-position: top right; - border-left: 1px solid #C0C4C8; - border-bottom: 1px solid #C0C4C8; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - margin: 1px; - width: 12px; - margin-bottom: -1px; -} - -QAbstractSpinBox::up-arrow, QAbstractSpinBox::up-arrow:disabled, QAbstractSpinBox::up-arrow:off { - image: url(":/qss_icons/light/rc/arrow_up_disabled.png"); - height: 8px; - width: 8px; -} - -QAbstractSpinBox::up-arrow:hover { - image: url(":/qss_icons/light/rc/arrow_up.png"); -} - -QAbstractSpinBox:down-button { - background-color: transparent #FAFAFA; - subcontrol-origin: border; - subcontrol-position: bottom right; - border-left: 1px solid #C0C4C8; - border-top: 1px solid #C0C4C8; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - margin: 1px; - width: 12px; - margin-top: -1px; -} - -QAbstractSpinBox::down-arrow, QAbstractSpinBox::down-arrow:disabled, QAbstractSpinBox::down-arrow:off { - image: url(":/qss_icons/light/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QAbstractSpinBox::down-arrow:hover { - image: url(":/qss_icons/light/rc/arrow_down.png"); -} - -QAbstractSpinBox:hover { - border: 1px solid #9FCBFF; - color: #19232D; -} - -QAbstractSpinBox:focus { - border: 1px solid #73C7FF; -} - -QAbstractSpinBox:selected { - background: #9FCBFF; - color: #C0C4C8; -} - -/* ------------------------------------------------------------------------ */ -/* DISPLAYS --------------------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QLabel ----------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe - ---------------------------------------------------------------------------- */ -QLabel { - background-color: #FAFAFA; - border: 0px solid #C0C4C8; - padding: 2px; - margin: 0px; - color: #19232D; -} - -QLabel:disabled { - background-color: #FAFAFA; - border: 0px solid #C0C4C8; - color: #9DA9B5; -} - -/* QTextBrowser ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qabstractscrollarea - ---------------------------------------------------------------------------- */ -QTextBrowser { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - border-radius: 4px; -} - -QTextBrowser:disabled { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #9DA9B5; - border-radius: 4px; -} - -QTextBrowser:hover, QTextBrowser:!hover, QTextBrowser:selected, QTextBrowser:pressed { - border: 1px solid #C0C4C8; -} - -/* QGraphicsView ---------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QGraphicsView { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - border-radius: 4px; -} - -QGraphicsView:disabled { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #9DA9B5; - border-radius: 4px; -} - -QGraphicsView:hover, QGraphicsView:!hover, QGraphicsView:selected, QGraphicsView:pressed { - border: 1px solid #C0C4C8; -} - -/* QCalendarWidget -------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QCalendarWidget { - border: 1px solid #C0C4C8; - border-radius: 4px; -} - -QCalendarWidget:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -/* QLCDNumber ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QLCDNumber { - background-color: #FAFAFA; - color: #19232D; -} - -QLCDNumber:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -/* QProgressBar ----------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qprogressbar - ---------------------------------------------------------------------------- */ -QProgressBar { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - border-radius: 4px; - text-align: center; -} - -QProgressBar:disabled { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #9DA9B5; - border-radius: 4px; - text-align: center; -} - -QProgressBar::chunk { - background-color: #9FCBFF; - color: #FAFAFA; - border-radius: 4px; -} - -QProgressBar::chunk:disabled { - background-color: #DAEDFF; - color: #9DA9B5; - border-radius: 4px; -} - -/* ------------------------------------------------------------------------ */ -/* BUTTONS ---------------------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QPushButton ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qpushbutton - ---------------------------------------------------------------------------- */ -QPushButton { - background-color: #C0C4C8; - color: #19232D; - border-radius: 4px; - padding: 2px; - outline: none; - border: none; -} - -QPushButton:disabled { - background-color: #C0C4C8; - color: #9DA9B5; - border-radius: 4px; - padding: 2px; -} - -QPushButton:checked { - background-color: #ACB1B6; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QPushButton:checked:disabled { - background-color: #ACB1B6; - color: #9DA9B5; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QPushButton:checked:selected { - background: #ACB1B6; -} - -QPushButton:hover { - background-color: #B4B8BC; - color: #19232D; -} - -QPushButton:pressed { - background-color: #ACB1B6; -} - -QPushButton:selected { - background: #ACB1B6; - color: #19232D; -} - -QPushButton::menu-indicator { - subcontrol-origin: padding; - subcontrol-position: bottom right; - bottom: 4px; -} - -QDialogButtonBox QPushButton { - /* Issue #194 #248 - Special case of QPushButton inside dialogs, for better UI */ - min-width: 80px; -} - -/* QToolButton ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbutton - ---------------------------------------------------------------------------- */ -QToolButton { - background-color: #C0C4C8; - color: #19232D; - border-radius: 4px; - padding: 2px; - outline: none; - border: none; - /* The subcontrols below are used only in the DelayedPopup mode */ - /* The subcontrols below are used only in the MenuButtonPopup mode */ - /* The subcontrol below is used only in the InstantPopup or DelayedPopup mode */ -} - -QToolButton:disabled { - background-color: #C0C4C8; - color: #9DA9B5; - border-radius: 4px; - padding: 2px; -} - -QToolButton:checked { - background-color: #ACB1B6; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QToolButton:checked:disabled { - background-color: #ACB1B6; - color: #9DA9B5; - border-radius: 4px; - padding: 2px; - outline: none; -} - -QToolButton:checked:hover { - background-color: #B4B8BC; - color: #19232D; -} - -QToolButton:checked:pressed { - background-color: #ACB1B6; -} - -QToolButton:checked:selected { - background: #ACB1B6; - color: #19232D; -} - -QToolButton:hover { - background-color: #B4B8BC; - color: #19232D; -} - -QToolButton:pressed { - background-color: #ACB1B6; -} - -QToolButton:selected { - background: #ACB1B6; - color: #19232D; -} - -QToolButton[popupMode="0"] { - /* Only for DelayedPopup */ - padding-right: 2px; -} - -QToolButton[popupMode="1"] { - /* Only for MenuButtonPopup */ - padding-right: 20px; -} - -QToolButton[popupMode="1"]::menu-button { - border: none; -} - -QToolButton[popupMode="1"]::menu-button:hover { - border: none; - border-left: 1px solid #C0C4C8; - border-radius: 0; -} - -QToolButton[popupMode="2"] { - /* Only for InstantPopup */ - padding-right: 2px; -} - -QToolButton::menu-button { - padding: 2px; - border-radius: 4px; - width: 12px; - border: none; - outline: none; -} - -QToolButton::menu-button:hover { - border: 1px solid #9FCBFF; -} - -QToolButton::menu-button:checked:hover { - border: 1px solid #9FCBFF; -} - -QToolButton::menu-indicator { - image: url(":/qss_icons/light/rc/arrow_down.png"); - height: 8px; - width: 8px; - top: 0; - /* Exclude a shift for better image */ - left: -2px; - /* Shift it a bit */ -} - -QToolButton::menu-arrow { - image: url(":/qss_icons/light/rc/arrow_down.png"); - height: 8px; - width: 8px; -} - -QToolButton::menu-arrow:hover { - image: url(":/qss_icons/light/rc/arrow_down_focus.png"); -} - -/* QCommandLinkButton ----------------------------------------------------- - ---------------------------------------------------------------------------- */ -QCommandLinkButton { - background-color: transparent; - border: 1px solid #C0C4C8; - color: #19232D; - border-radius: 4px; - padding: 0px; - margin: 0px; -} - -QCommandLinkButton:disabled { - background-color: transparent; - color: #9DA9B5; -} - -/* ------------------------------------------------------------------------ */ -/* INPUTS - NO FIELDS ----------------------------------------------------- */ -/* ------------------------------------------------------------------------ */ -/* QComboBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcombobox - ---------------------------------------------------------------------------- */ -QComboBox { - border: 1px solid #C0C4C8; - border-radius: 4px; - selection-background-color: #9FCBFF; - padding-left: 4px; - padding-right: 4px; - /* padding-right = 36; 4 + 16*2 See scrollbar size */ - /* changed to 4px to fix #239 */ - /* Fixes #103, #111 */ - min-height: 1.5em; - /* padding-top: 2px; removed to fix #132 */ - /* padding-bottom: 2px; removed to fix #132 */ - /* min-width: 75px; removed to fix #109 */ - /* Needed to remove indicator - fix #132 */ -} - -QComboBox QAbstractItemView { - border: 1px solid #C0C4C8; - border-radius: 0; - background-color: #FAFAFA; - selection-background-color: #9FCBFF; -} - -QComboBox QAbstractItemView:hover { - background-color: #FAFAFA; - color: #19232D; -} - -QComboBox QAbstractItemView:selected { - background: #9FCBFF; - color: #C0C4C8; -} - -QComboBox QAbstractItemView:alternate { - background: #FAFAFA; -} - -QComboBox:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -QComboBox:hover { - border: 1px solid #9FCBFF; -} - -QComboBox:focus { - border: 1px solid #73C7FF; -} - -QComboBox:on { - selection-background-color: #9FCBFF; -} - -QComboBox::indicator { - border: none; - border-radius: 0; - background-color: transparent; - selection-background-color: transparent; - color: transparent; - selection-color: transparent; - /* Needed to remove indicator - fix #132 */ -} - -QComboBox::indicator:alternate { - background: #FAFAFA; -} - -QComboBox::item { - /* Remove to fix #282, #285 and MR #288*/ - /*&:checked { - font-weight: bold; - } - - &:selected { - border: 0px solid transparent; - } - */ -} - -QComboBox::item:alternate { - background: #FAFAFA; -} - -QComboBox::drop-down { - subcontrol-origin: padding; - subcontrol-position: top right; - width: 12px; - border-left: 1px solid #C0C4C8; -} - -QComboBox::down-arrow { - image: url(":/qss_icons/light/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QComboBox::down-arrow:on, QComboBox::down-arrow:hover, QComboBox::down-arrow:focus { - image: url(":/qss_icons/light/rc/arrow_down.png"); -} - -/* QSlider ---------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qslider - ---------------------------------------------------------------------------- */ -QSlider:disabled { - background: #FAFAFA; -} - -QSlider:focus { - border: none; -} - -QSlider::groove:horizontal { - background: #C0C4C8; - border: 1px solid #C0C4C8; - height: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::groove:vertical { - background: #C0C4C8; - border: 1px solid #C0C4C8; - width: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::add-page:vertical { - background: #9FCBFF; - border: 1px solid #C0C4C8; - width: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::add-page:vertical :disabled { - background: #DAEDFF; -} - -QSlider::sub-page:horizontal { - background: #9FCBFF; - border: 1px solid #C0C4C8; - height: 4px; - margin: 0px; - border-radius: 4px; -} - -QSlider::sub-page:horizontal:disabled { - background: #DAEDFF; -} - -QSlider::handle:horizontal { - background: #788D9C; - border: 1px solid #C0C4C8; - width: 8px; - height: 8px; - margin: -8px 0px; - border-radius: 4px; -} - -QSlider::handle:horizontal:hover { - background: #9FCBFF; - border: 1px solid #9FCBFF; -} - -QSlider::handle:horizontal:focus { - border: 1px solid #73C7FF; -} - -QSlider::handle:vertical { - background: #788D9C; - border: 1px solid #C0C4C8; - width: 8px; - height: 8px; - margin: 0 -8px; - border-radius: 4px; -} - -QSlider::handle:vertical:hover { - background: #9FCBFF; - border: 1px solid #9FCBFF; -} - -QSlider::handle:vertical:focus { - border: 1px solid #73C7FF; -} - -/* QLineEdit -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlineedit - ---------------------------------------------------------------------------- */ -QLineEdit { - background-color: #FAFAFA; - padding-top: 2px; - /* This QLineEdit fix 103, 111 */ - padding-bottom: 2px; - /* This QLineEdit fix 103, 111 */ - padding-left: 4px; - padding-right: 4px; - border-style: solid; - border: 1px solid #C0C4C8; - border-radius: 4px; - color: #19232D; -} - -QLineEdit:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -QLineEdit:hover { - border: 1px solid #9FCBFF; - color: #19232D; -} - -QLineEdit:focus { - border: 1px solid #73C7FF; -} - -QLineEdit:selected { - background-color: #9FCBFF; - color: #C0C4C8; -} - -/* QTabWiget -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar - ---------------------------------------------------------------------------- */ -QTabWidget { - padding: 2px; - selection-background-color: #C0C4C8; -} - -QTabWidget QWidget { - /* Fixes #189 */ - border-radius: 4px; -} - -QTabWidget::pane { - border: 1px solid #C0C4C8; - border-radius: 4px; - margin: 0px; - /* Fixes double border inside pane with pyqt5 */ - padding: 0px; -} - -QTabWidget::pane:selected { - background-color: #C0C4C8; - border: 1px solid #9FCBFF; -} - -/* QTabBar ---------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar - ---------------------------------------------------------------------------- */ -QTabBar, QDockWidget QTabBar { - qproperty-drawBase: 0; - border-radius: 4px; - margin: 0px; - padding: 2px; - border: 0; - /* left: 5px; move to the right by 5px - removed for fix */ -} - -QTabBar::close-button, QDockWidget QTabBar::close-button { - border: 0; - margin: 0; - padding: 4px; - image: url(":/qss_icons/light/rc/window_close.png"); -} - -QTabBar::close-button:hover, QDockWidget QTabBar::close-button:hover { - image: url(":/qss_icons/light/rc/window_close_focus.png"); -} - -QTabBar::close-button:pressed, QDockWidget QTabBar::close-button:pressed { - image: url(":/qss_icons/light/rc/window_close_pressed.png"); -} - -QTabBar::tab, QDockWidget QTabBar::tab { - /* !selected and disabled ----------------------------------------- */ - /* selected ------------------------------------------------------- */ -} - -QTabBar::tab:top:selected:disabled, QDockWidget QTabBar::tab:top:selected:disabled { - border-bottom: 3px solid #DAEDFF; - color: #9DA9B5; - background-color: #C0C4C8; -} - -QTabBar::tab:bottom:selected:disabled, QDockWidget QTabBar::tab:bottom:selected:disabled { - border-top: 3px solid #DAEDFF; - color: #9DA9B5; - background-color: #C0C4C8; -} - -QTabBar::tab:left:selected:disabled, QDockWidget QTabBar::tab:left:selected:disabled { - border-right: 3px solid #DAEDFF; - color: #9DA9B5; - background-color: #C0C4C8; -} - -QTabBar::tab:right:selected:disabled, QDockWidget QTabBar::tab:right:selected:disabled { - border-left: 3px solid #DAEDFF; - color: #9DA9B5; - background-color: #C0C4C8; -} - -QTabBar::tab:top:!selected:disabled, QDockWidget QTabBar::tab:top:!selected:disabled { - border-bottom: 3px solid #FAFAFA; - color: #9DA9B5; - background-color: #FAFAFA; -} - -QTabBar::tab:bottom:!selected:disabled, QDockWidget QTabBar::tab:bottom:!selected:disabled { - border-top: 3px solid #FAFAFA; - color: #9DA9B5; - background-color: #FAFAFA; -} - -QTabBar::tab:left:!selected:disabled, QDockWidget QTabBar::tab:left:!selected:disabled { - border-right: 3px solid #FAFAFA; - color: #9DA9B5; - background-color: #FAFAFA; -} - -QTabBar::tab:right:!selected:disabled, QDockWidget QTabBar::tab:right:!selected:disabled { - border-left: 3px solid #FAFAFA; - color: #9DA9B5; - background-color: #FAFAFA; -} - -QTabBar::tab:top:!selected, QDockWidget QTabBar::tab:top:!selected { - border-bottom: 2px solid #FAFAFA; - margin-top: 2px; -} - -QTabBar::tab:bottom:!selected, QDockWidget QTabBar::tab:bottom:!selected { - border-top: 2px solid #FAFAFA; - margin-bottom: 2px; -} - -QTabBar::tab:left:!selected, QDockWidget QTabBar::tab:left:!selected { - border-left: 2px solid #FAFAFA; - margin-right: 2px; -} - -QTabBar::tab:right:!selected, QDockWidget QTabBar::tab:right:!selected { - border-right: 2px solid #FAFAFA; - margin-left: 2px; -} - -QTabBar::tab:top, QDockWidget QTabBar::tab:top { - background-color: #C0C4C8; - margin-left: 2px; - padding-left: 4px; - padding-right: 4px; - padding-top: 2px; - padding-bottom: 2px; - min-width: 5px; - border-bottom: 3px solid #C0C4C8; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QTabBar::tab:top:selected, QDockWidget QTabBar::tab:top:selected { - background-color: #B4B8BC; - border-bottom: 3px solid #37AEFE; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QTabBar::tab:top:!selected:hover, QDockWidget QTabBar::tab:top:!selected:hover { - border: 1px solid #73C7FF; - border-bottom: 3px solid #73C7FF; - /* Fixes spyder-ide/spyder#9766 and #243 */ - padding-left: 3px; - padding-right: 3px; -} - -QTabBar::tab:bottom, QDockWidget QTabBar::tab:bottom { - border-top: 3px solid #C0C4C8; - background-color: #C0C4C8; - margin-left: 2px; - padding-left: 4px; - padding-right: 4px; - padding-top: 2px; - padding-bottom: 2px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - min-width: 5px; -} - -QTabBar::tab:bottom:selected, QDockWidget QTabBar::tab:bottom:selected { - background-color: #B4B8BC; - border-top: 3px solid #37AEFE; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} - -QTabBar::tab:bottom:!selected:hover, QDockWidget QTabBar::tab:bottom:!selected:hover { - border: 1px solid #73C7FF; - border-top: 3px solid #73C7FF; - /* Fixes spyder-ide/spyder#9766 and #243 */ - padding-left: 3px; - padding-right: 3px; -} - -QTabBar::tab:left, QDockWidget QTabBar::tab:left { - background-color: #C0C4C8; - margin-top: 2px; - padding-left: 2px; - padding-right: 2px; - padding-top: 4px; - padding-bottom: 4px; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - min-height: 5px; -} - -QTabBar::tab:left:selected, QDockWidget QTabBar::tab:left:selected { - background-color: #B4B8BC; - border-right: 3px solid #37AEFE; -} - -QTabBar::tab:left:!selected:hover, QDockWidget QTabBar::tab:left:!selected:hover { - border: 1px solid #73C7FF; - border-right: 3px solid #73C7FF; - /* Fixes different behavior #271 */ - margin-right: 0px; - padding-right: -1px; -} - -QTabBar::tab:right, QDockWidget QTabBar::tab:right { - background-color: #C0C4C8; - margin-top: 2px; - padding-left: 2px; - padding-right: 2px; - padding-top: 4px; - padding-bottom: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - min-height: 5px; -} - -QTabBar::tab:right:selected, QDockWidget QTabBar::tab:right:selected { - background-color: #B4B8BC; - border-left: 3px solid #37AEFE; -} - -QTabBar::tab:right:!selected:hover, QDockWidget QTabBar::tab:right:!selected:hover { - border: 1px solid #73C7FF; - border-left: 3px solid #73C7FF; - /* Fixes different behavior #271 */ - margin-left: 0px; - padding-left: 0px; -} - -QTabBar QToolButton, QDockWidget QTabBar QToolButton { - /* Fixes #136 */ - background-color: #C0C4C8; - height: 12px; - width: 12px; -} - -QTabBar QToolButton:pressed, QDockWidget QTabBar QToolButton:pressed { - background-color: #C0C4C8; -} - -QTabBar QToolButton:pressed:hover, QDockWidget QTabBar QToolButton:pressed:hover { - border: 1px solid #9FCBFF; -} - -QTabBar QToolButton::left-arrow:enabled, QDockWidget QTabBar QToolButton::left-arrow:enabled { - image: url(":/qss_icons/light/rc/arrow_left.png"); -} - -QTabBar QToolButton::left-arrow:disabled, QDockWidget QTabBar QToolButton::left-arrow:disabled { - image: url(":/qss_icons/light/rc/arrow_left_disabled.png"); -} - -QTabBar QToolButton::right-arrow:enabled, QDockWidget QTabBar QToolButton::right-arrow:enabled { - image: url(":/qss_icons/light/rc/arrow_right.png"); -} - -QTabBar QToolButton::right-arrow:disabled, QDockWidget QTabBar QToolButton::right-arrow:disabled { - image: url(":/qss_icons/light/rc/arrow_right_disabled.png"); -} - -/* QDockWiget ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QDockWidget { - outline: 1px solid #C0C4C8; - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - border-radius: 4px; - titlebar-close-icon: url(":/qss_icons/light/rc/transparent.png"); - titlebar-normal-icon: url(":/qss_icons/light/rc/transparent.png"); -} - -QDockWidget::title { - /* Better size for title bar */ - padding: 3px; - spacing: 4px; - border: none; - background-color: #C0C4C8; -} - -QDockWidget::close-button { - icon-size: 12px; - border: none; - background: transparent; - background-image: transparent; - border: 0; - margin: 0; - padding: 0; - image: url(":/qss_icons/light/rc/window_close.png"); -} - -QDockWidget::close-button:hover { - image: url(":/qss_icons/light/rc/window_close_focus.png"); -} - -QDockWidget::close-button:pressed { - image: url(":/qss_icons/light/rc/window_close_pressed.png"); -} - -QDockWidget::float-button { - icon-size: 12px; - border: none; - background: transparent; - background-image: transparent; - border: 0; - margin: 0; - padding: 0; - image: url(":/qss_icons/light/rc/window_undock.png"); -} - -QDockWidget::float-button:hover { - image: url(":/qss_icons/light/rc/window_undock_focus.png"); -} - -QDockWidget::float-button:pressed { - image: url(":/qss_icons/light/rc/window_undock_pressed.png"); -} - -/* QTreeView QListView QTableView ----------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlistview -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtableview - ---------------------------------------------------------------------------- */ -QTreeView:branch:selected, QTreeView:branch:hover { - background: url(":/qss_icons/light/rc/transparent.png"); -} - -QTreeView:branch:has-siblings:!adjoins-item { - border-image: url(":/qss_icons/light/rc/branch_line.png") 0; -} - -QTreeView:branch:has-siblings:adjoins-item { - border-image: url(":/qss_icons/light/rc/branch_more.png") 0; -} - -QTreeView:branch:!has-children:!has-siblings:adjoins-item { - border-image: url(":/qss_icons/light/rc/branch_end.png") 0; -} - -QTreeView:branch:has-children:!has-siblings:closed, QTreeView:branch:closed:has-children:has-siblings { - border-image: none; - image: url(":/qss_icons/light/rc/branch_closed.png"); -} - -QTreeView:branch:open:has-children:!has-siblings, QTreeView:branch:open:has-children:has-siblings { - border-image: none; - image: url(":/qss_icons/light/rc/branch_open.png"); -} - -QTreeView:branch:has-children:!has-siblings:closed:hover, QTreeView:branch:closed:has-children:has-siblings:hover { - image: url(":/qss_icons/light/rc/branch_closed_focus.png"); -} - -QTreeView:branch:open:has-children:!has-siblings:hover, QTreeView:branch:open:has-children:has-siblings:hover { - image: url(":/qss_icons/light/rc/branch_open_focus.png"); -} - -QTreeView::indicator:checked, -QListView::indicator:checked, -QTableView::indicator:checked, -QColumnView::indicator:checked { - image: url(":/qss_icons/light/rc/checkbox_checked.png"); -} - -QTreeView::indicator:checked:hover, QTreeView::indicator:checked:focus, QTreeView::indicator:checked:pressed, -QListView::indicator:checked:hover, -QListView::indicator:checked:focus, -QListView::indicator:checked:pressed, -QTableView::indicator:checked:hover, -QTableView::indicator:checked:focus, -QTableView::indicator:checked:pressed, -QColumnView::indicator:checked:hover, -QColumnView::indicator:checked:focus, -QColumnView::indicator:checked:pressed { - image: url(":/qss_icons/light/rc/checkbox_checked_focus.png"); -} - -QTreeView::indicator:unchecked, -QListView::indicator:unchecked, -QTableView::indicator:unchecked, -QColumnView::indicator:unchecked { - image: url(":/qss_icons/light/rc/checkbox_unchecked.png"); -} - -QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:focus, QTreeView::indicator:unchecked:pressed, -QListView::indicator:unchecked:hover, -QListView::indicator:unchecked:focus, -QListView::indicator:unchecked:pressed, -QTableView::indicator:unchecked:hover, -QTableView::indicator:unchecked:focus, -QTableView::indicator:unchecked:pressed, -QColumnView::indicator:unchecked:hover, -QColumnView::indicator:unchecked:focus, -QColumnView::indicator:unchecked:pressed { - image: url(":/qss_icons/light/rc/checkbox_unchecked_focus.png"); -} - -QTreeView::indicator:indeterminate, -QListView::indicator:indeterminate, -QTableView::indicator:indeterminate, -QColumnView::indicator:indeterminate { - image: url(":/qss_icons/light/rc/checkbox_indeterminate.png"); -} - -QTreeView::indicator:indeterminate:hover, QTreeView::indicator:indeterminate:focus, QTreeView::indicator:indeterminate:pressed, -QListView::indicator:indeterminate:hover, -QListView::indicator:indeterminate:focus, -QListView::indicator:indeterminate:pressed, -QTableView::indicator:indeterminate:hover, -QTableView::indicator:indeterminate:focus, -QTableView::indicator:indeterminate:pressed, -QColumnView::indicator:indeterminate:hover, -QColumnView::indicator:indeterminate:focus, -QColumnView::indicator:indeterminate:pressed { - image: url(":/qss_icons/light/rc/checkbox_indeterminate_focus.png"); -} - -QTreeView, -QListView, -QTableView, -QColumnView { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - gridline-color: #C0C4C8; - border-radius: 4px; -} - -QTreeView:disabled, -QListView:disabled, -QTableView:disabled, -QColumnView:disabled { - background-color: #FAFAFA; - color: #9DA9B5; -} - -QTreeView:selected, -QListView:selected, -QTableView:selected, -QColumnView:selected { - background-color: #9FCBFF; - color: #C0C4C8; -} - -QTreeView:focus, -QListView:focus, -QTableView:focus, -QColumnView:focus { - border: 1px solid #73C7FF; -} - -QTreeView::item:pressed, -QListView::item:pressed, -QTableView::item:pressed, -QColumnView::item:pressed { - background-color: #9FCBFF; -} - -QTreeView::item:selected:active, -QListView::item:selected:active, -QTableView::item:selected:active, -QColumnView::item:selected:active { - background-color: #9FCBFF; -} - -QTreeView::item:selected:!active, -QListView::item:selected:!active, -QTableView::item:selected:!active, -QColumnView::item:selected:!active { - color: #19232D; - background-color: #D2D5D8; -} - -QTreeView::item:!selected:hover, -QListView::item:!selected:hover, -QTableView::item:!selected:hover, -QColumnView::item:!selected:hover { - outline: 0; - color: #19232D; - background-color: #D2D5D8; -} - -QTableCornerButton::section { - background-color: #FAFAFA; - border: 1px transparent #C0C4C8; - border-radius: 0px; -} - -/* QHeaderView ------------------------------------------------------------ - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qheaderview - ---------------------------------------------------------------------------- */ -QHeaderView { - background-color: #C0C4C8; - border: 0px transparent #C0C4C8; - padding: 0; - margin: 0; - border-radius: 0; -} - -QHeaderView:disabled { - background-color: #C0C4C8; - border: 1px transparent #C0C4C8; -} - -QHeaderView::section { - background-color: #C0C4C8; - color: #19232D; - border-radius: 0; - text-align: left; - font-size: 13px; -} - -QHeaderView::section::horizontal { - padding-top: 0; - padding-bottom: 0; - padding-left: 4px; - padding-right: 4px; - border-left: 1px solid #FAFAFA; -} - -QHeaderView::section::horizontal::first, QHeaderView::section::horizontal::only-one { - border-left: 1px solid #C0C4C8; -} - -QHeaderView::section::horizontal:disabled { - color: #9DA9B5; -} - -QHeaderView::section::vertical { - padding-top: 0; - padding-bottom: 0; - padding-left: 4px; - padding-right: 4px; - border-top: 1px solid #FAFAFA; -} - -QHeaderView::section::vertical::first, QHeaderView::section::vertical::only-one { - border-top: 1px solid #C0C4C8; -} - -QHeaderView::section::vertical:disabled { - color: #9DA9B5; -} - -QHeaderView::down-arrow { - /* Those settings (border/width/height/background-color) solve bug */ - /* transparent arrow background and size */ - background-color: #C0C4C8; - border: none; - height: 12px; - width: 12px; - padding-left: 2px; - padding-right: 2px; - image: url(":/qss_icons/light/rc/arrow_down.png"); -} - -QHeaderView::up-arrow { - background-color: #C0C4C8; - border: none; - height: 12px; - width: 12px; - padding-left: 2px; - padding-right: 2px; - image: url(":/qss_icons/light/rc/arrow_up.png"); -} - -/* QToolBox -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbox - ---------------------------------------------------------------------------- */ -QToolBox { - padding: 0px; - border: 0px; - border: 1px solid #C0C4C8; -} - -QToolBox:selected { - padding: 0px; - border: 2px solid #9FCBFF; -} - -QToolBox::tab { - background-color: #FAFAFA; - border: 1px solid #C0C4C8; - color: #19232D; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -QToolBox::tab:disabled { - color: #9DA9B5; -} - -QToolBox::tab:selected { - background-color: #ACB1B6; - border-bottom: 2px solid #9FCBFF; -} - -QToolBox::tab:selected:disabled { - background-color: #C0C4C8; - border-bottom: 2px solid #DAEDFF; -} - -QToolBox::tab:!selected { - background-color: #C0C4C8; - border-bottom: 2px solid #C0C4C8; -} - -QToolBox::tab:!selected:disabled { - background-color: #FAFAFA; -} - -QToolBox::tab:hover { - border-color: #73C7FF; - border-bottom: 2px solid #73C7FF; -} - -QToolBox QScrollArea { - padding: 0px; - border: 0px; - background-color: #FAFAFA; -} - -/* QFrame ----------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe -https://doc.qt.io/qt-5/qframe.html#-prop -https://doc.qt.io/qt-5/qframe.html#details -https://stackoverflow.com/questions/14581498/qt-stylesheet-for-hline-vline-color - ---------------------------------------------------------------------------- */ -/* (dot) .QFrame fix #141, #126, #123 */ -.QFrame { - border-radius: 4px; - border: 1px solid #C0C4C8; - /* No frame */ - /* HLine */ - /* HLine */ -} - -.QFrame[frameShape="0"] { - border-radius: 4px; - border: 1px transparent #C0C4C8; -} - -.QFrame[frameShape="4"] { - max-height: 2px; - border: none; - background-color: #C0C4C8; -} - -.QFrame[frameShape="5"] { - max-width: 2px; - border: none; - background-color: #C0C4C8; -} - -/* QSplitter -------------------------------------------------------------- - -https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qsplitter - ---------------------------------------------------------------------------- */ -QSplitter { - background-color: #C0C4C8; - spacing: 0px; - padding: 0px; - margin: 0px; -} - -QSplitter::handle { - background-color: #C0C4C8; - border: 0px solid #FAFAFA; - spacing: 0px; - padding: 1px; - margin: 0px; -} - -QSplitter::handle:hover { - background-color: #788D9C; -} - -QSplitter::handle:horizontal { - width: 5px; - image: url(":/qss_icons/light/rc/line_vertical.png"); -} - -QSplitter::handle:vertical { - height: 5px; - image: url(":/qss_icons/light/rc/line_horizontal.png"); -} - -/* QDateEdit, QDateTimeEdit ----------------------------------------------- - ---------------------------------------------------------------------------- */ -QDateEdit, QDateTimeEdit { - selection-background-color: #9FCBFF; - border-style: solid; - border: 1px solid #C0C4C8; - border-radius: 4px; - /* This fixes 103, 111 */ - padding-top: 2px; - /* This fixes 103, 111 */ - padding-bottom: 2px; - padding-left: 4px; - padding-right: 4px; - min-width: 10px; -} - -QDateEdit:on, QDateTimeEdit:on { - selection-background-color: #9FCBFF; -} - -QDateEdit::drop-down, QDateTimeEdit::drop-down { - subcontrol-origin: padding; - subcontrol-position: top right; - width: 12px; - border-left: 1px solid #C0C4C8; -} - -QDateEdit::down-arrow, QDateTimeEdit::down-arrow { - image: url(":/qss_icons/light/rc/arrow_down_disabled.png"); - height: 8px; - width: 8px; -} - -QDateEdit::down-arrow:on, QDateEdit::down-arrow:hover, QDateEdit::down-arrow:focus, QDateTimeEdit::down-arrow:on, QDateTimeEdit::down-arrow:hover, QDateTimeEdit::down-arrow:focus { - image: url(":/qss_icons/light/rc/arrow_down.png"); -} - -QDateEdit QAbstractItemView, QDateTimeEdit QAbstractItemView { - background-color: #FAFAFA; - border-radius: 4px; - border: 1px solid #C0C4C8; - selection-background-color: #9FCBFF; -} - -/* QAbstractView ---------------------------------------------------------- - ---------------------------------------------------------------------------- */ -QAbstractView:hover { - border: 1px solid #9FCBFF; - color: #19232D; -} - -QAbstractView:selected { - background: #9FCBFF; - color: #C0C4C8; -} - -/* PlotWidget ------------------------------------------------------------- - ---------------------------------------------------------------------------- */ -PlotWidget { - /* Fix cut labels in plots #134 */ - padding: 0px; -} diff --git a/LunaTranslator/requirements.txt b/LunaTranslator/requirements.txt index 90fe72e0..2562d1dd 100644 --- a/LunaTranslator/requirements.txt +++ b/LunaTranslator/requirements.txt @@ -1,4 +1,6 @@ PyQt5==5.15.10 PyQt5-Qt5==5.15.2 webviewpy==1.2.0 -pefile \ No newline at end of file +pefile +qdarkstyle +pyqtdarktheme \ No newline at end of file diff --git a/LunaTranslator/retrieval.py b/LunaTranslator/retrieval.py index 1e38de55..0dd504f7 100644 --- a/LunaTranslator/retrieval.py +++ b/LunaTranslator/retrieval.py @@ -178,6 +178,10 @@ copycheck( os.path.join(py37Path, "Lib/site-packages/PyQt5/Qt5/bin/Qt5Core.dll"), os.path.join(runtime, "PyQt5/Qt5/bin"), ) +copycheck( + os.path.join(py37Path, "Lib/site-packages/PyQt5/Qt5/bin/Qt5Svg.dll"), + os.path.join(runtime, "PyQt5/Qt5/bin"), +) copycheck( os.path.join(py37Path, "Lib/site-packages/PyQt5/Qt5/bin/Qt5Gui.dll"), os.path.join(runtime, "PyQt5/Qt5/bin"), @@ -188,6 +192,10 @@ copycheck( os.path.join(runtime, "PyQt5/Qt5/bin"), ) +copycheck( + os.path.join(py37Path, "Lib/site-packages/PyQt5/Qt5/plugins/iconengines"), + os.path.join(runtime, "PyQt5/Qt5/plugins"), +) copycheck( os.path.join(py37Path, "Lib/site-packages/PyQt5/Qt5/plugins/imageformats"), os.path.join(runtime, "PyQt5/Qt5/plugins"), @@ -210,6 +218,18 @@ copycheck( ), os.path.join(runtime, "PyQt5/Qt5/plugins/styles"), ) +copycheck( + os.path.join( + py37Path, "Lib/site-packages/qdarktheme" + ), + os.path.join(runtime), +) +copycheck( + os.path.join( + py37Path, "Lib/site-packages/qdarkstyle" + ), + os.path.join(runtime), +) collect = [] for _dir, _, fs in os.walk(targetdir):