- minor fixes + dark style improvements
@ -220,7 +220,7 @@ if (TARGET_WIN)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# List resources
|
# List resources
|
||||||
qt5_add_resources(UI_RESOURCES resources/qdarkstyle/style.qrc)
|
qt5_add_resources(UI_RESOURCES resources/qdarkstyle/dark/style.qrc)
|
||||||
# Global defines
|
# Global defines
|
||||||
add_definitions(-DQTKEYCHAIN_NO_EXPORT -DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION)
|
add_definitions(-DQTKEYCHAIN_NO_EXPORT -DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION)
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
// Auto generated file ! Please do not edit !
|
// Auto generated file ! Please do not edit !
|
||||||
#define APP_BUILD_NUMBER 215
|
#define APP_BUILD_NUMBER 235
|
||||||
BIN
client/icons/app_icon_linux_256.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@ -181,7 +181,7 @@ void MainWindow::initClient()
|
|||||||
ui->mPreferencesAction->setMenuRole(QAction::PreferencesRole);
|
ui->mPreferencesAction->setMenuRole(QAction::PreferencesRole);
|
||||||
|
|
||||||
connect(ui->mAboutAction, SIGNAL(triggered()), this, SLOT(about()));
|
connect(ui->mAboutAction, SIGNAL(triggered()), this, SLOT(about()));
|
||||||
connect(ui->mPreferencesAction, SIGNAL(triggered()), this, SLOT(preferences()));
|
//connect(ui->mPreferencesAction, SIGNAL(triggered()), this, SLOT(preferences()));
|
||||||
|
|
||||||
// Add Check for update to OS X application menu
|
// Add Check for update to OS X application menu
|
||||||
ui->mCheckForUpdatesAction->setMenuRole(QAction::ApplicationSpecificRole);
|
ui->mCheckForUpdatesAction->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
@ -190,6 +190,11 @@ void MainWindow::initClient()
|
|||||||
if (QSystemTrayIcon::isSystemTrayAvailable() && mSettings->data()[KEY_SHOW_TRAY_ICON].toBool())
|
if (QSystemTrayIcon::isSystemTrayAvailable() && mSettings->data()[KEY_SHOW_TRAY_ICON].toBool())
|
||||||
initTrayIcon();
|
initTrayIcon();
|
||||||
|
|
||||||
|
#if defined(TARGET_LINUX)
|
||||||
|
QIcon appicon(":/icons/app_icon_linux_256.png");
|
||||||
|
setWindowIcon(appicon);
|
||||||
|
#endif
|
||||||
|
|
||||||
loadGeometry();
|
loadGeometry();
|
||||||
|
|
||||||
ui->mTaskTree->setSelectionBehavior(QAbstractItemView::SelectRows);
|
ui->mTaskTree->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||||
@ -472,6 +477,7 @@ void MainWindow::preferences()
|
|||||||
|
|
||||||
updateData();
|
updateData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::about()
|
void MainWindow::about()
|
||||||
|
|||||||
@ -58,5 +58,6 @@
|
|||||||
<file>icons/tree-add-root.png</file>
|
<file>icons/tree-add-root.png</file>
|
||||||
<file>icons/clock-32x32.png</file>
|
<file>icons/clock-32x32.png</file>
|
||||||
<file>icons/tree-add-sibling-small.png</file>
|
<file>icons/tree-add-sibling-small.png</file>
|
||||||
|
<file>icons/app_icon_linux_256.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
1
client/resources/qdarkstyle/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/*.pyc
|
|
||||||
@ -1,10 +1,21 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""QDarkStyle is a dark stylesheet for Python and Qt applications.
|
"""The most complete dark/light style sheet for Qt applications (Qt4, Qt5,
|
||||||
|
PySide, PySide2, PyQt4, PyQt5, QtPy, PyQtGraph, Qt.Py) for Python 2/3 and C++.
|
||||||
|
|
||||||
This module provides a function to transparently load the stylesheets
|
Python 2, as well as Qt4 (PyQt4 and PySide), will not be supported anymore.
|
||||||
with the correct rc file.
|
They still there as it is, but no back-compatibility, fixes, nor features
|
||||||
|
will be implemented.
|
||||||
|
|
||||||
|
We still preparing the portability to Qt6 since we need changes in
|
||||||
|
`QtPy <https://github.com/spyder-ide/qtpy>`__ dependency project.
|
||||||
|
|
||||||
|
Check the `documentation <https://qdarkstylesheet.readthedocs.io/en/stable>`__
|
||||||
|
to see how to set the desirable theme palette.
|
||||||
|
|
||||||
|
This module provides a function to load the stylesheets transparently
|
||||||
|
with the right resources file.
|
||||||
|
|
||||||
First, start importing our module
|
First, start importing our module
|
||||||
|
|
||||||
@ -13,27 +24,29 @@ First, start importing our module
|
|||||||
import qdarkstyle
|
import qdarkstyle
|
||||||
|
|
||||||
Then you can get stylesheet provided by QDarkStyle for various Qt wrappers
|
Then you can get stylesheet provided by QDarkStyle for various Qt wrappers
|
||||||
as shown bellow
|
as shown below
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# PySide
|
# PySide
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_pyside()
|
dark_stylesheet = qdarkstyle.load_stylesheet_pyside()
|
||||||
# PySide
|
# PySide 2
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_pyside2()
|
dark_stylesheet = qdarkstyle.load_stylesheet_pyside2()
|
||||||
# PyQt4
|
# PyQt4
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt()
|
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt()
|
||||||
# PyQt5
|
# PyQt5
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()
|
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()
|
||||||
|
|
||||||
Or from environment variables provided for QtPy or PyQtGraph, see
|
Alternatively, from environment variables provided by QtPy, PyQtGraph, Qt.Py
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# QtPy
|
# QtPy
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_from_environment()
|
dark_stylesheet = qdarkstyle.load_stylesheet()
|
||||||
# PyQtGraph
|
# PyQtGraph
|
||||||
dark_stylesheet = qdarkstyle.load_stylesheet_from_environment(is_pyqtgraph)
|
dark_stylesheet = qdarkstyle.load_stylesheet(qt_api=os.environ('PYQTGRAPH_QT_LIB'))
|
||||||
|
# Qt.Py
|
||||||
|
dark_stylesheet = qdarkstyle.load_stylesheet(qt_api=Qt.__binding__)
|
||||||
|
|
||||||
Finally, set your QApplication with it
|
Finally, set your QApplication with it
|
||||||
|
|
||||||
@ -45,278 +58,396 @@ Enjoy!
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Standard library imports
|
||||||
import logging
|
import logging
|
||||||
import platform
|
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
__version__ = "2.6.0"
|
# Local imports
|
||||||
|
from qdarkstyle.dark.palette import DarkPalette
|
||||||
|
from qdarkstyle.light.palette import LightPalette
|
||||||
|
from qdarkstyle.palette import Palette
|
||||||
|
|
||||||
PYQTGRAPH_QT_LIB_VALUES = ['PyQt', 'PyQt5', 'PySide', 'PySide2']
|
__version__ = "3.0.2"
|
||||||
QT_API_VALUES = ['pyqt', 'pyqt5', 'pyside', 'pyside2']
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# Folder's path
|
||||||
|
REPO_PATH = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
|
||||||
|
|
||||||
|
EXAMPLE_PATH = os.path.join(REPO_PATH, 'example')
|
||||||
|
IMAGES_PATH = os.path.join(REPO_PATH, 'docs/images')
|
||||||
|
PACKAGE_PATH = os.path.join(REPO_PATH, 'qdarkstyle')
|
||||||
|
|
||||||
|
QSS_PATH = os.path.join(PACKAGE_PATH, 'qss')
|
||||||
|
RC_PATH = os.path.join(PACKAGE_PATH, 'rc')
|
||||||
|
SVG_PATH = os.path.join(PACKAGE_PATH, 'svg')
|
||||||
|
|
||||||
|
# File names
|
||||||
|
QSS_FILE = 'style.qss'
|
||||||
|
QRC_FILE = QSS_FILE.replace('.qss', '.qrc')
|
||||||
|
|
||||||
|
MAIN_SCSS_FILE = 'main.scss'
|
||||||
|
STYLES_SCSS_FILE = '_styles.scss'
|
||||||
|
VARIABLES_SCSS_FILE = '_variables.scss'
|
||||||
|
|
||||||
|
# File paths
|
||||||
|
QSS_FILEPATH = os.path.join(PACKAGE_PATH, QSS_FILE)
|
||||||
|
QRC_FILEPATH = os.path.join(PACKAGE_PATH, QRC_FILE)
|
||||||
|
|
||||||
|
MAIN_SCSS_FILEPATH = os.path.join(QSS_PATH, MAIN_SCSS_FILE)
|
||||||
|
STYLES_SCSS_FILEPATH = os.path.join(QSS_PATH, STYLES_SCSS_FILE)
|
||||||
|
VARIABLES_SCSS_FILEPATH = os.path.join(QSS_PATH, VARIABLES_SCSS_FILE)
|
||||||
|
|
||||||
|
# Todo: check if we are deprecate all those functions or keep them
|
||||||
|
DEPRECATION_MSG = '''This function will be deprecated in v3.0.
|
||||||
|
Please, set the wanted binding by using QtPy environment variable QT_API,
|
||||||
|
then use load_stylesheet() or use load_stylesheet()
|
||||||
|
passing the argument qt_api='wanted_binding'.'''
|
||||||
|
|
||||||
|
|
||||||
def _logger():
|
def _apply_os_patches(palette):
|
||||||
return logging.getLogger('qdarkstyle')
|
|
||||||
|
|
||||||
|
|
||||||
def _qt_wrapper_import(qt_api):
|
|
||||||
"""
|
"""
|
||||||
Check if Qt API defined can be imported.
|
Apply OS-only specific stylesheet pacthes.
|
||||||
|
|
||||||
:param qt_api: Qt API string to test import
|
|
||||||
|
|
||||||
:return load function fot given qt_api, otherwise empty string
|
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: stylesheet string (css).
|
||||||
"""
|
"""
|
||||||
qt_wrapper = ''
|
os_fix = ""
|
||||||
loader = ""
|
|
||||||
|
if platform.system().lower() == 'darwin':
|
||||||
|
# See issue #12, #267
|
||||||
|
os_fix = '''
|
||||||
|
QDockWidget::title
|
||||||
|
{{
|
||||||
|
background-color: {color};
|
||||||
|
text-align: center;
|
||||||
|
height: 12px;
|
||||||
|
}}
|
||||||
|
QTabBar::close-button {{
|
||||||
|
padding: 2px;
|
||||||
|
}}
|
||||||
|
'''.format(color=palette.COLOR_BACKGROUND_4)
|
||||||
|
|
||||||
|
# Only open the QSS file if any patch is needed
|
||||||
|
if os_fix:
|
||||||
|
_logger.info("Found OS patches to be applied.")
|
||||||
|
|
||||||
|
return os_fix
|
||||||
|
|
||||||
|
|
||||||
|
def _apply_binding_patches():
|
||||||
|
"""
|
||||||
|
Apply binding-only specific stylesheet patches for the same OS.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: stylesheet string (css).
|
||||||
|
"""
|
||||||
|
binding_fix = ""
|
||||||
|
|
||||||
|
if binding_fix:
|
||||||
|
_logger.info("Found binding patches to be applied.")
|
||||||
|
|
||||||
|
return binding_fix
|
||||||
|
|
||||||
|
|
||||||
|
def _apply_version_patches(qt_version):
|
||||||
|
"""
|
||||||
|
Apply version-only specific stylesheet patches for the same binding.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
qt_version (str): Qt string version.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: stylesheet string (css).
|
||||||
|
"""
|
||||||
|
version_fix = ""
|
||||||
|
|
||||||
|
major, minor, patch = qt_version.split('.')
|
||||||
|
major, minor, patch = int(major), int(minor), int(patch)
|
||||||
|
|
||||||
|
if major == 5 and minor >= 14:
|
||||||
|
# See issue #214
|
||||||
|
version_fix = '''
|
||||||
|
QMenu::item {
|
||||||
|
padding: 4px 24px 4px 6px;
|
||||||
|
}
|
||||||
|
'''
|
||||||
|
|
||||||
|
if version_fix:
|
||||||
|
_logger.info("Found version patches to be applied.")
|
||||||
|
|
||||||
|
return version_fix
|
||||||
|
|
||||||
|
|
||||||
|
def _apply_application_patches(QCoreApplication, QPalette, QColor, palette):
|
||||||
|
"""
|
||||||
|
Apply application level fixes on the QPalette.
|
||||||
|
|
||||||
|
The import names args must be passed here because the import is done
|
||||||
|
inside the load_stylesheet() function, as QtPy is only imported in
|
||||||
|
that moment for setting reasons.
|
||||||
|
"""
|
||||||
|
# See issue #139
|
||||||
|
color = palette.COLOR_ACCENT_3
|
||||||
|
qcolor = QColor(color)
|
||||||
|
|
||||||
|
# Todo: check if it is qcoreapplication indeed
|
||||||
|
app = QCoreApplication.instance()
|
||||||
|
|
||||||
|
_logger.info("Found application patches to be applied.")
|
||||||
|
|
||||||
|
if app:
|
||||||
|
app_palette = app.palette()
|
||||||
|
app_palette.setColor(QPalette.Normal, QPalette.Link, qcolor)
|
||||||
|
app.setPalette(app_palette)
|
||||||
|
else:
|
||||||
|
_logger.warn("No QCoreApplication instance found. "
|
||||||
|
"Application patches not applied. "
|
||||||
|
"You have to call load_stylesheet function after "
|
||||||
|
"instantiation of QApplication to take effect. ")
|
||||||
|
|
||||||
|
|
||||||
|
def _load_stylesheet(qt_api='', palette=None):
|
||||||
|
"""
|
||||||
|
Load the stylesheet based on QtPy abstraction layer environment variable.
|
||||||
|
|
||||||
|
If the argument is not passed, it uses the current QT_API environment
|
||||||
|
variable to make the imports of Qt bindings. If passed, it sets this
|
||||||
|
variable then make the imports.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
qt_api (str): qt binding name to set QT_API environment variable.
|
||||||
|
Default is ''. Possible values are pyside, pyside2
|
||||||
|
pyqt4, pyqt5. Not case sensitive.
|
||||||
|
palette (Palette): Palette class that inherits from Palette.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
- Note that the variable QT_API is read when first imported. So,
|
||||||
|
pay attention to the import order.
|
||||||
|
- If you are using another abstraction layer, i.e PyQtGraph to do
|
||||||
|
imports on Qt things you must set both to use the same Qt
|
||||||
|
binding (PyQt, PySide).
|
||||||
|
- OS, binding and binding version number, and application specific
|
||||||
|
patches are applied in this order.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: stylesheet string (css).
|
||||||
|
"""
|
||||||
|
|
||||||
|
if qt_api:
|
||||||
|
os.environ['QT_API'] = qt_api
|
||||||
|
|
||||||
|
# Import is made after setting QT_API
|
||||||
|
from qtpy.QtCore import QCoreApplication, QFile, QTextStream
|
||||||
|
from qtpy.QtGui import QColor, QPalette
|
||||||
|
from qtpy import QT_VERSION
|
||||||
|
|
||||||
|
# Then we import resources - binary qrc content
|
||||||
|
if palette is None:
|
||||||
|
from qdarkstyle.dark import style_rc
|
||||||
|
palette = DarkPalette
|
||||||
|
elif palette.ID == 'dark':
|
||||||
|
from qdarkstyle.dark import style_rc
|
||||||
|
palette = DarkPalette
|
||||||
|
elif palette.ID == 'light':
|
||||||
|
from qdarkstyle.light import style_rc
|
||||||
|
palette = LightPalette
|
||||||
|
else:
|
||||||
|
print("Not recognized ID for palette! Exiting!")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Thus, by importing the binary we can access the resources
|
||||||
|
package_dir = os.path.basename(PACKAGE_PATH)
|
||||||
|
qss_rc_path = ":" + os.path.join(package_dir, palette.ID, QSS_FILE)
|
||||||
|
|
||||||
|
_logger.debug("Reading QSS file in: %s" % qss_rc_path)
|
||||||
|
|
||||||
|
# It gets the qss file from compiled style_rc that was imported,
|
||||||
|
# not from the file QSS as we are using resources
|
||||||
|
qss_file = QFile(qss_rc_path)
|
||||||
|
|
||||||
|
if qss_file.exists():
|
||||||
|
qss_file.open(QFile.ReadOnly | QFile.Text)
|
||||||
|
text_stream = QTextStream(qss_file)
|
||||||
|
stylesheet = text_stream.readAll()
|
||||||
|
_logger.info("QSS file sucessfuly loaded.")
|
||||||
|
else:
|
||||||
|
stylesheet = ""
|
||||||
|
# Todo: check this raise type and add to docs
|
||||||
|
raise FileNotFoundError("Unable to find QSS file '{}' "
|
||||||
|
"in resources.".format(qss_rc_path))
|
||||||
|
|
||||||
|
_logger.debug("Checking patches for being applied.")
|
||||||
|
|
||||||
|
# Todo: check execution order for these functions
|
||||||
|
# 1. Apply OS specific patches
|
||||||
|
stylesheet += _apply_os_patches(palette)
|
||||||
|
|
||||||
|
# 2. Apply binding specific patches
|
||||||
|
stylesheet += _apply_binding_patches()
|
||||||
|
|
||||||
|
# 3. Apply binding version specific patches
|
||||||
|
stylesheet += _apply_version_patches(QT_VERSION)
|
||||||
|
|
||||||
|
# 4. Apply palette fix. See issue #139
|
||||||
|
_apply_application_patches(QCoreApplication, QPalette, QColor, palette)
|
||||||
|
|
||||||
|
return stylesheet
|
||||||
|
|
||||||
|
|
||||||
|
def load_stylesheet(*args, **kwargs):
|
||||||
|
"""
|
||||||
|
Load the stylesheet. Takes care of importing the rc module.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
pyside (bool): True to load the PySide (or PySide2) rc file,
|
||||||
|
False to load the PyQt4 (or PyQt5) rc file.
|
||||||
|
Default is False.
|
||||||
|
or
|
||||||
|
|
||||||
|
qt_api (str): Qt binding name to set QT_API environment variable.
|
||||||
|
Default is '', i.e PyQt5 the default QtPy binding.
|
||||||
|
Possible values are pyside, pyside2 pyqt4, pyqt5.
|
||||||
|
Not case sensitive.
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
palette (Palette): Class (not instance) that inherits from Palette.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
TypeError: If arguments do not match: type, keyword name nor quantity.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
|
"""
|
||||||
|
|
||||||
|
stylesheet = ""
|
||||||
|
arg = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if qt_api == 'PyQt' or qt_api == 'pyqt':
|
arg = args[0]
|
||||||
import PyQt4
|
except IndexError:
|
||||||
qt_wrapper = 'PyQt4'
|
# It is already none
|
||||||
loader = load_stylesheet_pyqt()
|
pass
|
||||||
elif qt_api == 'PyQt5' or qt_api == 'pyqt5':
|
|
||||||
import PyQt5
|
# Get palette
|
||||||
qt_wrapper = 'PyQt5'
|
palette = kwargs.get('palette', None)
|
||||||
loader = load_stylesheet_pyqt5()
|
|
||||||
elif qt_api == 'PySide' or qt_api == 'pyside':
|
# Number of arguments are wrong
|
||||||
import PySide
|
if (kwargs and args) or len(args) > 2 or len(kwargs) > 2:
|
||||||
qt_wrapper = 'PySide'
|
raise TypeError("load_stylesheet() takes zero, one or two arguments: "
|
||||||
loader = load_stylesheet_pyside()
|
"(new) string type qt_api='pyqt5' or "
|
||||||
elif qt_api == 'PySide2' or qt_api == 'pyside2':
|
"(old) boolean type pyside='False' or "
|
||||||
import PySide2
|
"(new) palette type palette=Palette.")
|
||||||
qt_wrapper = 'PySide2'
|
|
||||||
loader = load_stylesheet_pyside2()
|
# No arguments
|
||||||
except ImportError as err:
|
if not kwargs and not args:
|
||||||
_logger().error("Impossible import Qt wrapper.\n %s", str(err))
|
stylesheet = _load_stylesheet(qt_api='pyqt5')
|
||||||
|
|
||||||
|
# Old API arguments
|
||||||
|
elif 'pyside' in kwargs or isinstance(arg, bool):
|
||||||
|
pyside = kwargs.get('pyside', arg)
|
||||||
|
|
||||||
|
if pyside:
|
||||||
|
stylesheet = _load_stylesheet(qt_api='pyside2', palette=palette)
|
||||||
|
if not stylesheet:
|
||||||
|
stylesheet = _load_stylesheet(qt_api='pyside', palette=palette)
|
||||||
|
|
||||||
|
else:
|
||||||
|
stylesheet = _load_stylesheet(qt_api='pyqt5', palette=palette)
|
||||||
|
if not stylesheet:
|
||||||
|
stylesheet = _load_stylesheet(qt_api='pyqt4', palette=palette)
|
||||||
|
|
||||||
|
# Deprecation warning only for old API
|
||||||
|
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
|
||||||
|
|
||||||
|
# New API arguments
|
||||||
|
elif 'qt_api' in kwargs or isinstance(arg, str):
|
||||||
|
qt_api = kwargs.get('qt_api', arg)
|
||||||
|
stylesheet = _load_stylesheet(qt_api=qt_api, palette=palette)
|
||||||
|
|
||||||
|
# Palette arg
|
||||||
|
elif 'palette' in kwargs or issubclass(arg, Palette):
|
||||||
|
palette_arg = kwargs.get('palette', arg)
|
||||||
|
stylesheet = _load_stylesheet(palette=palette_arg)
|
||||||
|
|
||||||
|
# Wrong API arguments name or type
|
||||||
else:
|
else:
|
||||||
_logger().info("Using Qt wrapper = %s ", qt_wrapper)
|
raise TypeError("load_stylesheet() takes only zero, one or two arguments: "
|
||||||
finally:
|
"(new) string type qt_api='pyqt5' or "
|
||||||
return loader
|
"(new) palette type palette=Palette or "
|
||||||
|
"(old) boolean type pyside='False'.")
|
||||||
|
|
||||||
|
return stylesheet
|
||||||
|
|
||||||
|
|
||||||
|
def load_stylesheet_pyside():
|
||||||
|
"""
|
||||||
|
Load the stylesheet for use in a PySide application.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
|
"""
|
||||||
|
return _load_stylesheet(qt_api='pyside')
|
||||||
|
|
||||||
|
|
||||||
|
def load_stylesheet_pyside2():
|
||||||
|
"""
|
||||||
|
Load the stylesheet for use in a PySide2 application.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
|
"""
|
||||||
|
return _load_stylesheet(qt_api='pyside2')
|
||||||
|
|
||||||
|
|
||||||
|
def load_stylesheet_pyqt():
|
||||||
|
"""
|
||||||
|
Load the stylesheet for use in a PyQt4 application.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
|
"""
|
||||||
|
return _load_stylesheet(qt_api='pyqt4')
|
||||||
|
|
||||||
|
|
||||||
|
def load_stylesheet_pyqt5():
|
||||||
|
"""
|
||||||
|
Load the stylesheet for use in a PyQt5 application.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
|
"""
|
||||||
|
return _load_stylesheet(qt_api='pyqt5')
|
||||||
|
|
||||||
|
|
||||||
|
# Deprecation Warning --------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet_from_environment(is_pyqtgraph=False):
|
def load_stylesheet_from_environment(is_pyqtgraph=False):
|
||||||
"""
|
"""
|
||||||
Load the stylesheet from QT_API (or PYQTGRAPH_QT_LIB) environment variable.
|
Load the stylesheet from QT_API (or PYQTGRAPH_QT_LIB) environment variable.
|
||||||
|
|
||||||
:param is_pyqtgraph: True if it is to be set using PYQTGRAPH_QT_LIB
|
Args:
|
||||||
|
is_pyqtgraph (bool): True if it is to be set using PYQTGRAPH_QT_LIB.
|
||||||
|
|
||||||
:raise KeyError: if QT_API/PYQTGRAPH_QT_LIB does not exist
|
Raises:
|
||||||
|
KeyError: if PYQTGRAPH_QT_LIB does not exist.
|
||||||
|
|
||||||
:return the stylesheet string
|
Returns:
|
||||||
|
str: the stylesheet string.
|
||||||
"""
|
"""
|
||||||
warnings.warn(
|
warnings.warn(DEPRECATION_MSG, DeprecationWarning)
|
||||||
"load_stylesheet_from_environment() will be deprecated in version 3,"
|
|
||||||
"use load_stylesheet()",
|
|
||||||
PendingDeprecationWarning
|
|
||||||
)
|
|
||||||
qt_api = ''
|
|
||||||
pyqtgraph_qt_lib = ''
|
|
||||||
|
|
||||||
loader = ""
|
if is_pyqtgraph:
|
||||||
|
stylesheet = _load_stylesheet(qt_api=os.environ.get('PYQTGRAPH_QT_LIB', None))
|
||||||
# Get values from QT_API
|
|
||||||
try:
|
|
||||||
qt_api = os.environ['QT_API']
|
|
||||||
except KeyError as err:
|
|
||||||
# Log this error just if using QT_API
|
|
||||||
if not is_pyqtgraph:
|
|
||||||
_logger().error("QT_API does not exist, do os.environ['QT_API']= "
|
|
||||||
"and choose one option from %s", QT_API_VALUES)
|
|
||||||
else:
|
else:
|
||||||
if not is_pyqtgraph:
|
stylesheet = _load_stylesheet()
|
||||||
if qt_api in QT_API_VALUES:
|
|
||||||
_logger().info("Found QT_API='%s'", qt_api)
|
|
||||||
loader = _qt_wrapper_import(qt_api)
|
|
||||||
else:
|
|
||||||
# Raise this error because the function need this key/value
|
|
||||||
raise KeyError("QT_API=%s is unknown, please use a value "
|
|
||||||
"from %s",
|
|
||||||
(qt_api, QT_API_VALUES))
|
|
||||||
|
|
||||||
# Get values from PYQTGRAPH_QT_LIB
|
return stylesheet
|
||||||
try:
|
|
||||||
pyqtgraph_qt_lib = os.environ['PYQTGRAPH_QT_LIB']
|
|
||||||
except KeyError as err:
|
|
||||||
# Log this error just if using PYQTGRAPH_QT_LIB
|
|
||||||
if is_pyqtgraph:
|
|
||||||
_logger().error("PYQTGRAP_QT_API does not exist, do "
|
|
||||||
"os.environ['PYQTGRAPH_QT_LIB']= "
|
|
||||||
"and choose one option from %s",
|
|
||||||
PYQTGRAPH_QT_LIB_VALUES)
|
|
||||||
else:
|
|
||||||
if is_pyqtgraph:
|
|
||||||
if pyqtgraph_qt_lib in PYQTGRAPH_QT_LIB_VALUES:
|
|
||||||
_logger().info("Found PYQTGRAPH_QT_LIB='%s'", pyqtgraph_qt_lib)
|
|
||||||
loader = _qt_wrapper_import(pyqtgraph_qt_lib)
|
|
||||||
else:
|
|
||||||
# Raise this error because the function need this key/value
|
|
||||||
raise KeyError("PYQTGRAPH_QT_LIB=%s is unknown, please use a "
|
|
||||||
"value from %s", (
|
|
||||||
pyqtgraph_qt_lib,
|
|
||||||
PYQTGRAPH_QT_LIB_VALUES))
|
|
||||||
|
|
||||||
# Just a warning if both are set but differs each other
|
|
||||||
if qt_api and pyqtgraph_qt_lib:
|
|
||||||
if qt_api != pyqtgraph_qt_lib.lower():
|
|
||||||
_logger().warning("Both QT_API=%s and PYQTGRAPH_QT_LIB=%s are set, "
|
|
||||||
"but with different values, this could cause "
|
|
||||||
"some issues if using them in the same project!",
|
|
||||||
qt_api, pyqtgraph_qt_lib)
|
|
||||||
|
|
||||||
return loader
|
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet(pyside=True):
|
# Deprecated ----------------------------------------------------------------
|
||||||
"""
|
|
||||||
Load the stylesheet. Takes care of importing the rc module.
|
|
||||||
|
|
||||||
:param pyside: True to load the pyside rc file, False to load the PyQt rc file
|
|
||||||
|
|
||||||
:return the stylesheet string
|
|
||||||
"""
|
|
||||||
warnings.warn(
|
|
||||||
"load_stylesheet() will not receive pyside parameter in version 3. "
|
|
||||||
"Set QtPy environment variable to specify the Qt binding insteady.",
|
|
||||||
FutureWarning
|
|
||||||
)
|
|
||||||
# Smart import of the rc file
|
|
||||||
|
|
||||||
pyside_ver = None
|
|
||||||
|
|
||||||
if pyside:
|
|
||||||
|
|
||||||
# Detect the PySide version available
|
|
||||||
try:
|
|
||||||
import PySide
|
|
||||||
except ModuleNotFoundError:
|
|
||||||
import PySide2
|
|
||||||
pyside_ver = 2
|
|
||||||
else:
|
|
||||||
pyside_ver = 1
|
|
||||||
|
|
||||||
if pyside_ver == 1:
|
|
||||||
import qdarkstyle.pyside_style_rc
|
|
||||||
else:
|
|
||||||
import qdarkstyle.pyside2_style_rc
|
|
||||||
else:
|
|
||||||
import qdarkstyle.pyqt_style_rc
|
|
||||||
|
|
||||||
# Load the stylesheet content from resources
|
|
||||||
if not pyside:
|
|
||||||
from PyQt4.QtCore import QFile, QTextStream
|
|
||||||
else:
|
|
||||||
if pyside_ver == 1:
|
|
||||||
from PySide.QtCore import QFile, QTextStream
|
|
||||||
else:
|
|
||||||
from PySide2.QtCore import QFile, QTextStream
|
|
||||||
|
|
||||||
f = QFile(":qdarkstyle/style.qss")
|
|
||||||
if not f.exists():
|
|
||||||
_logger().error("Unable to load stylesheet, file not found in "
|
|
||||||
"resources")
|
|
||||||
return ""
|
|
||||||
else:
|
|
||||||
f.open(QFile.ReadOnly | QFile.Text)
|
|
||||||
ts = QTextStream(f)
|
|
||||||
stylesheet = ts.readAll()
|
|
||||||
if platform.system().lower() == 'darwin': # see issue #12 on github
|
|
||||||
mac_fix = '''
|
|
||||||
QDockWidget::title
|
|
||||||
{
|
|
||||||
background-color: #31363b;
|
|
||||||
text-align: center;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
stylesheet += mac_fix
|
|
||||||
return stylesheet
|
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet_pyside():
|
|
||||||
"""
|
|
||||||
Load the stylesheet for use in a pyside application.
|
|
||||||
|
|
||||||
:return the stylesheet string
|
|
||||||
"""
|
|
||||||
warnings.warn(
|
|
||||||
"load_stylesheet_pyside() will be deprecated in version 3,"
|
|
||||||
"set QtPy environment variable to specify the Qt binding and "
|
|
||||||
"use load_stylesheet()",
|
|
||||||
PendingDeprecationWarning
|
|
||||||
)
|
|
||||||
return load_stylesheet(pyside=True)
|
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet_pyside2():
|
|
||||||
"""
|
|
||||||
Load the stylesheet for use in a pyside2 application.
|
|
||||||
|
|
||||||
:raise NotImplementedError: Because it is not supported yet
|
|
||||||
"""
|
|
||||||
warnings.warn(
|
|
||||||
"load_stylesheet_pyside2() will be deprecated in version 3,"
|
|
||||||
"set QtPy environment variable to specify the Qt binding and "
|
|
||||||
"use load_stylesheet()",
|
|
||||||
PendingDeprecationWarning
|
|
||||||
)
|
|
||||||
return load_stylesheet(pyside=True)
|
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet_pyqt():
|
|
||||||
"""
|
|
||||||
Load the stylesheet for use in a pyqt4 application.
|
|
||||||
|
|
||||||
:return the stylesheet string
|
|
||||||
"""
|
|
||||||
warnings.warn(
|
|
||||||
"load_stylesheet_pyqt() will be deprecated in version 3,"
|
|
||||||
"set QtPy environment variable to specify the Qt binding and "
|
|
||||||
"use load_stylesheet()",
|
|
||||||
PendingDeprecationWarning
|
|
||||||
)
|
|
||||||
return load_stylesheet(pyside=False)
|
|
||||||
|
|
||||||
|
|
||||||
def load_stylesheet_pyqt5():
|
|
||||||
"""
|
|
||||||
Load the stylesheet for use in a pyqt5 application.
|
|
||||||
|
|
||||||
:param pyside: True to load the pyside rc file, False to load the PyQt rc file
|
|
||||||
|
|
||||||
:return the stylesheet string
|
|
||||||
"""
|
|
||||||
warnings.warn(
|
|
||||||
"load_stylesheet_pyqt5() will be deprecated in version 3,"
|
|
||||||
"set QtPy environment variable to specify the Qt binding and "
|
|
||||||
"use load_stylesheet()",
|
|
||||||
PendingDeprecationWarning
|
|
||||||
)
|
|
||||||
# Smart import of the rc file
|
|
||||||
import qdarkstyle.pyqt5_style_rc
|
|
||||||
|
|
||||||
# Load the stylesheet content from resources
|
|
||||||
from PyQt5.QtCore import QFile, QTextStream
|
|
||||||
|
|
||||||
f = QFile(":qdarkstyle/style.qss")
|
|
||||||
if not f.exists():
|
|
||||||
_logger().error("Unable to load stylesheet, file not found in "
|
|
||||||
"resources")
|
|
||||||
return ""
|
|
||||||
else:
|
|
||||||
f.open(QFile.ReadOnly | QFile.Text)
|
|
||||||
ts = QTextStream(f)
|
|
||||||
stylesheet = ts.readAll()
|
|
||||||
if platform.system().lower() == 'darwin': # see issue #12 on github
|
|
||||||
mac_fix = '''
|
|
||||||
QDockWidget::title
|
|
||||||
{
|
|
||||||
background-color: #31363b;
|
|
||||||
text-align: center;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
'''
|
|
||||||
stylesheet += mac_fix
|
|
||||||
return stylesheet
|
|
||||||
|
|||||||
66
client/resources/qdarkstyle/__main__.py
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Standard library imports
|
||||||
|
import argparse
|
||||||
|
import sys
|
||||||
|
from os.path import abspath, dirname
|
||||||
|
|
||||||
|
# Local imports
|
||||||
|
import qdarkstyle
|
||||||
|
|
||||||
|
sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/..'))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Execute QDarkStyle helper."""
|
||||||
|
parser = argparse.ArgumentParser(description="QDarkStyle helper. Use the option --all to report bugs (requires 'helpdev')",
|
||||||
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
|
parser.add_argument('-i', '--information', action='store_true',
|
||||||
|
help="Show information about environment")
|
||||||
|
parser.add_argument('-b', '--bindings', action='store_true',
|
||||||
|
help="Show available bindings for Qt")
|
||||||
|
parser.add_argument('-a', '--abstractions', action='store_true',
|
||||||
|
help="Show available abstraction layers for Qt bindings")
|
||||||
|
parser.add_argument('-d', '--dependencies', action='store_true',
|
||||||
|
help="Show information about dependencies")
|
||||||
|
|
||||||
|
parser.add_argument('--all', action='store_true',
|
||||||
|
help="Show all information options at once")
|
||||||
|
|
||||||
|
parser.add_argument('--version', '-v', action='version',
|
||||||
|
version='v{}'.format(qdarkstyle.__version__))
|
||||||
|
|
||||||
|
# parsing arguments from command line
|
||||||
|
args = parser.parse_args()
|
||||||
|
no_args = not len(sys.argv) > 1
|
||||||
|
info = {}
|
||||||
|
|
||||||
|
if no_args:
|
||||||
|
parser.print_help()
|
||||||
|
|
||||||
|
try:
|
||||||
|
import helpdev
|
||||||
|
|
||||||
|
except (ModuleNotFoundError, ImportError):
|
||||||
|
print("You need to install the package helpdev to retrieve detailed information (e.g pip install helpdev)")
|
||||||
|
|
||||||
|
else:
|
||||||
|
if args.information or args.all:
|
||||||
|
info.update(helpdev.check_os())
|
||||||
|
info.update(helpdev.check_python())
|
||||||
|
|
||||||
|
if args.bindings or args.all:
|
||||||
|
info.update(helpdev.check_qt_bindings())
|
||||||
|
|
||||||
|
if args.abstractions or args.all:
|
||||||
|
info.update(helpdev.check_qt_abstractions())
|
||||||
|
|
||||||
|
if args.dependencies or args.all:
|
||||||
|
info.update(helpdev.check_python_packages(packages='helpdev,qdarkstyle'))
|
||||||
|
|
||||||
|
helpdev.print_output(info)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
38
client/resources/qdarkstyle/colorsystem.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# colorsystem.py is the full list of colors that can be used to easily create themes.
|
||||||
|
|
||||||
|
class Gray:
|
||||||
|
B0 = '#000000'
|
||||||
|
B10 = '#19232D'
|
||||||
|
B20 = '#293544'
|
||||||
|
B30 = '#37414F'
|
||||||
|
B40 = '#455364'
|
||||||
|
B50 = '#54687A'
|
||||||
|
B60 = '#60798B'
|
||||||
|
B70 = '#788D9C'
|
||||||
|
B80 = '#9DA9B5'
|
||||||
|
B90 = '#ACB1B6'
|
||||||
|
B100 = '#B9BDC1'
|
||||||
|
B110 = '#C9CDD0'
|
||||||
|
B120 = '#CED1D4'
|
||||||
|
B130 = '#E0E1E3'
|
||||||
|
B140 = '#FAFAFA'
|
||||||
|
B150 = '#FFFFFF'
|
||||||
|
|
||||||
|
|
||||||
|
class Blue:
|
||||||
|
B0 = '#000000'
|
||||||
|
B10 = '#062647'
|
||||||
|
B20 = '#26486B'
|
||||||
|
B30 = '#375A7F'
|
||||||
|
B40 = '#346792'
|
||||||
|
B50 = '#1A72BB'
|
||||||
|
B60 = '#057DCE'
|
||||||
|
B70 = '#259AE9'
|
||||||
|
B80 = '#37AEFE'
|
||||||
|
B90 = '#73C7FF'
|
||||||
|
B100 = '#9FCBFF'
|
||||||
|
B110 = '#C2DFFA'
|
||||||
|
B120 = '#CEE8FF'
|
||||||
|
B130 = '#DAEDFF'
|
||||||
|
B140 = '#F5FAFF'
|
||||||
|
B150 = '##FFFFFF'
|
||||||
@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# The MIT License (MIT)
|
|
||||||
#
|
|
||||||
# Copyright (c) <2013-2014> <Colin Duquesnoy>
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
|
||||||
# in the Software without restriction, including without limitation the rights
|
|
||||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
# copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
# THE SOFTWARE.
|
|
||||||
#
|
|
||||||
"""
|
|
||||||
Utility scripts to compile the qrc file. The script will
|
|
||||||
attempt to compile the qrc file using the following tools:
|
|
||||||
- rcc
|
|
||||||
- pyside-rcc
|
|
||||||
- pyrcc4
|
|
||||||
|
|
||||||
Delete the compiled files that you don't want to use
|
|
||||||
manually after running this script.
|
|
||||||
"""
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def compile_all():
|
|
||||||
"""
|
|
||||||
Compile style.qrc using rcc, pyside-rcc and pyrcc4
|
|
||||||
"""
|
|
||||||
# print("Compiling for Qt: style.qrc -> style.rcc")
|
|
||||||
# os.system("rcc style.qrc -o style.rcc")
|
|
||||||
print("Compiling for PyQt4: style.qrc -> pyqt_style_rc.py")
|
|
||||||
os.system("pyrcc4 -py3 style.qrc -o pyqt_style_rc.py")
|
|
||||||
print("Compiling for PyQt5: style.qrc -> pyqt5_style_rc.py")
|
|
||||||
os.system("pyrcc5 style.qrc -o pyqt5_style_rc.py")
|
|
||||||
print("Compiling for PySide: style.qrc -> pyside_style_rc.py")
|
|
||||||
os.system("pyside-rcc -py3 style.qrc -o pyside_style_rc.py")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
compile_all()
|
|
||||||
3
client/resources/qdarkstyle/dark/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
33
client/resources/qdarkstyle/dark/_variables.scss
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// WARNING! File created programmatically. All changes made in this file will be lost!
|
||||||
|
//
|
||||||
|
// Created by the qtsass compiler v0.3.0
|
||||||
|
//
|
||||||
|
// The definitions are in the "qdarkstyle.palette" module
|
||||||
|
//
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
$ID: 'dark';
|
||||||
|
$COLOR_BACKGROUND_6: #60798B;
|
||||||
|
$COLOR_BACKGROUND_5: #54687A;
|
||||||
|
$COLOR_BACKGROUND_4: #455364;
|
||||||
|
$COLOR_BACKGROUND_2: #293544;
|
||||||
|
$COLOR_BACKGROUND_3: #37414F;
|
||||||
|
$COLOR_BACKGROUND_1: #19232D;
|
||||||
|
$COLOR_TEXT_1: #E0E1E3;
|
||||||
|
$COLOR_TEXT_2: #C9CDD0;
|
||||||
|
$COLOR_TEXT_3: #ACB1B6;
|
||||||
|
$COLOR_TEXT_4: #9DA9B5;
|
||||||
|
$COLOR_ACCENT_1: #26486B;
|
||||||
|
$COLOR_ACCENT_2: #346792;
|
||||||
|
$COLOR_ACCENT_3: #1A72BB;
|
||||||
|
$COLOR_ACCENT_4: #259AE9;
|
||||||
|
$OPACITY_TOOLTIP: 230;
|
||||||
|
$SIZE_BORDER_RADIUS: 4px;
|
||||||
|
$BORDER_1: 1px solid $COLOR_BACKGROUND_1;
|
||||||
|
$BORDER_2: 1px solid $COLOR_BACKGROUND_4;
|
||||||
|
$BORDER_3: 1px solid $COLOR_BACKGROUND_6;
|
||||||
|
$BORDER_SELECTION_3: 1px solid $COLOR_ACCENT_3;
|
||||||
|
$BORDER_SELECTION_2: 1px solid $COLOR_ACCENT_2;
|
||||||
|
$BORDER_SELECTION_1: 1px solid $COLOR_ACCENT_1;
|
||||||
|
$PATH_RESOURCES: ':/qss_icons';
|
||||||
4
client/resources/qdarkstyle/dark/main.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* Light Style - QDarkStyleSheet ------------------------------------------ */
|
||||||
|
|
||||||
|
@import '_variables';
|
||||||
|
@import '../qss/_styles';
|
||||||
36
client/resources/qdarkstyle/dark/palette.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""QDarkStyle default dark palette."""
|
||||||
|
|
||||||
|
# Local imports
|
||||||
|
from qdarkstyle.colorsystem import Blue, Gray
|
||||||
|
from qdarkstyle.palette import Palette
|
||||||
|
|
||||||
|
|
||||||
|
class DarkPalette(Palette):
|
||||||
|
"""Dark palette variables."""
|
||||||
|
|
||||||
|
# Identifier
|
||||||
|
ID = 'dark'
|
||||||
|
|
||||||
|
# Color
|
||||||
|
COLOR_BACKGROUND_1 = Gray.B10
|
||||||
|
COLOR_BACKGROUND_2 = Gray.B20
|
||||||
|
COLOR_BACKGROUND_3 = Gray.B30
|
||||||
|
COLOR_BACKGROUND_4 = Gray.B40
|
||||||
|
COLOR_BACKGROUND_5 = Gray.B50
|
||||||
|
COLOR_BACKGROUND_6 = Gray.B60
|
||||||
|
|
||||||
|
COLOR_TEXT_1 = Gray.B130
|
||||||
|
COLOR_TEXT_2 = Gray.B110
|
||||||
|
COLOR_TEXT_3 = Gray.B90
|
||||||
|
COLOR_TEXT_4 = Gray.B80
|
||||||
|
|
||||||
|
COLOR_ACCENT_1 = Blue.B20
|
||||||
|
COLOR_ACCENT_2 = Blue.B40
|
||||||
|
COLOR_ACCENT_3 = Blue.B50
|
||||||
|
COLOR_ACCENT_4 = Blue.B70
|
||||||
|
COLOR_ACCENT_5 = Blue.B80
|
||||||
|
|
||||||
|
OPACITY_TOOLTIP = 230
|
||||||
1
client/resources/qdarkstyle/dark/rc/.keep
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
BIN
client/resources/qdarkstyle/dark/rc/arrow_down.png
Normal file
|
After Width: | Height: | Size: 522 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_disabled.png
Normal file
|
After Width: | Height: | Size: 546 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_focus.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_focus@2x.png
Normal file
|
After Width: | Height: | Size: 992 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_pressed.png
Normal file
|
After Width: | Height: | Size: 567 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_down_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left.png
Normal file
|
After Width: | Height: | Size: 558 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_disabled.png
Normal file
|
After Width: | Height: | Size: 557 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_focus.png
Normal file
|
After Width: | Height: | Size: 551 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_focus@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_pressed.png
Normal file
|
After Width: | Height: | Size: 574 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_left_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right.png
Normal file
|
After Width: | Height: | Size: 546 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_disabled.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_focus.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_focus@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_pressed.png
Normal file
|
After Width: | Height: | Size: 574 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_right_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up.png
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up@2x.png
Normal file
|
After Width: | Height: | Size: 1008 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_disabled.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_focus.png
Normal file
|
After Width: | Height: | Size: 532 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_focus@2x.png
Normal file
|
After Width: | Height: | Size: 990 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_pressed.png
Normal file
|
After Width: | Height: | Size: 554 B |
BIN
client/resources/qdarkstyle/dark/rc/arrow_up_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon@2x.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_disabled.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_focus.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_focus@2x.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_pressed.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/base_icon_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed.png
Normal file
|
After Width: | Height: | Size: 397 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed@2x.png
Normal file
|
After Width: | Height: | Size: 824 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed_disabled.png
Normal file
|
After Width: | Height: | Size: 426 B |
|
After Width: | Height: | Size: 862 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed_focus.png
Normal file
|
After Width: | Height: | Size: 395 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed_focus@2x.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed_pressed.png
Normal file
|
After Width: | Height: | Size: 415 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_closed_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 867 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end.png
Normal file
|
After Width: | Height: | Size: 151 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end@2x.png
Normal file
|
After Width: | Height: | Size: 205 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_disabled.png
Normal file
|
After Width: | Height: | Size: 152 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 205 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_focus.png
Normal file
|
After Width: | Height: | Size: 149 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_focus@2x.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_pressed.png
Normal file
|
After Width: | Height: | Size: 152 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_end_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 204 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line.png
Normal file
|
After Width: | Height: | Size: 133 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line@2x.png
Normal file
|
After Width: | Height: | Size: 238 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_disabled.png
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 240 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_focus.png
Normal file
|
After Width: | Height: | Size: 134 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_focus@2x.png
Normal file
|
After Width: | Height: | Size: 238 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_pressed.png
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_line_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 239 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more@2x.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_disabled.png
Normal file
|
After Width: | Height: | Size: 167 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 263 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_focus.png
Normal file
|
After Width: | Height: | Size: 164 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_focus@2x.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_pressed.png
Normal file
|
After Width: | Height: | Size: 161 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_more_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 262 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open@2x.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_disabled.png
Normal file
|
After Width: | Height: | Size: 422 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_disabled@2x.png
Normal file
|
After Width: | Height: | Size: 872 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_focus.png
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_focus@2x.png
Normal file
|
After Width: | Height: | Size: 791 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_pressed.png
Normal file
|
After Width: | Height: | Size: 421 B |
BIN
client/resources/qdarkstyle/dark/rc/branch_open_pressed@2x.png
Normal file
|
After Width: | Height: | Size: 860 B |
BIN
client/resources/qdarkstyle/dark/rc/checkbox_checked.png
Normal file
|
After Width: | Height: | Size: 650 B |
BIN
client/resources/qdarkstyle/dark/rc/checkbox_checked@2x.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 731 B |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
client/resources/qdarkstyle/dark/rc/checkbox_checked_focus.png
Normal file
|
After Width: | Height: | Size: 655 B |