From a9cdb94ff34c8b0127490efafa2e6d7135498173 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 31 May 2021 19:45:30 -0400 Subject: [PATCH] Port styling to latest `qtdarkstyle` version --- piker/ui/_style.py | 15 +++++++++------ setup.py | 11 +++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/piker/ui/_style.py b/piker/ui/_style.py index 322247ec..b8b40686 100644 --- a/piker/ui/_style.py +++ b/piker/ui/_style.py @@ -22,7 +22,7 @@ import math import pyqtgraph as pg from PyQt5 import QtCore, QtGui -from qdarkstyle.palette import DarkPalette +from qdarkstyle import DarkPalette from ..log import get_logger from ._exec import current_screen @@ -134,8 +134,6 @@ _font = DpiAwareFont() # TODO: re-compute font size when main widget switches screens? # https://forum.qt.io/topic/54136/how-do-i-get-the-qscreen-my-widget-is-on-qapplication-desktop-screen-returns-a-qwidget-and-qobject_cast-qscreen-returns-null/3 -# _i3_rgba = QtGui.QColor.fromRgbF(*[0.14]*3 + [1]) - # splitter widget config _xaxis_at = 'bottom' @@ -175,6 +173,7 @@ def hcolor(name: str) -> str: 'gray': '#808080', # like the kick 'grayer': '#4c4c4c', 'grayest': '#3f3f3f', + 'i3': '#494D4F', 'jet': '#343434', 'cadet': '#91A3B0', 'marengo': '#91A3B0', @@ -185,9 +184,13 @@ def hcolor(name: str) -> str: 'bracket': '#666666', # like the logo 'original': '#a9a9a9', - # palette - 'default': DarkPalette.COLOR_BACKGROUND_NORMAL, - 'default_light': DarkPalette.COLOR_BACKGROUND_LIGHT, + # from ``qdarkstyle`` palette + 'default_darkest': DarkPalette.COLOR_BACKGROUND_1, + 'default_dark': DarkPalette.COLOR_BACKGROUND_2, + 'default': DarkPalette.COLOR_BACKGROUND_3, + 'default_light': DarkPalette.COLOR_BACKGROUND_4, + 'default_lightest': DarkPalette.COLOR_BACKGROUND_5, + 'default_spotlight': DarkPalette.COLOR_BACKGROUND_6, 'white': '#ffffff', # for tinas and sunbathers diff --git a/setup.py b/setup.py index 4b8d8b1d..ebd034fa 100755 --- a/setup.py +++ b/setup.py @@ -70,17 +70,12 @@ setup( # UI 'PyQt5', 'pyqtgraph', - 'qdarkstyle==2.8.1', - #'kivy', see requirement.txt; using a custom branch atm - - # tsdbs - 'pymarketstore', - - #'kivy', see requirement.txt; using a custom branch atm - + 'qdarkstyle >= 3.0.2', # fuzzy search 'fuzzywuzzy[speedup]', + # tsdbs + 'pymarketstore', ], tests_require=['pytest'], python_requires=">=3.9", # literally for ``datetime.datetime.fromisoformat``...