feat(themes): moved themes to bec_qthemes
This reverts commit fd6ae91993
@ -2,11 +2,10 @@ import itertools
|
|||||||
import re
|
import re
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
|
|
||||||
|
import bec_qthemes
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
import qdarkstyle
|
|
||||||
from pydantic_core import PydanticCustomError
|
from pydantic_core import PydanticCustomError
|
||||||
from qdarkstyle import DarkPalette, LightPalette
|
|
||||||
from qtpy.QtGui import QColor
|
from qtpy.QtGui import QColor
|
||||||
from qtpy.QtWidgets import QApplication
|
from qtpy.QtWidgets import QApplication
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ CURRENT_THEME = "dark"
|
|||||||
|
|
||||||
|
|
||||||
def get_theme_palette():
|
def get_theme_palette():
|
||||||
return DarkPalette if CURRENT_THEME == "dark" else LightPalette
|
return bec_qthemes.load_palette(CURRENT_THEME)
|
||||||
|
|
||||||
|
|
||||||
def apply_theme(theme: Literal["dark", "light"]):
|
def apply_theme(theme: Literal["dark", "light"]):
|
||||||
@ -30,7 +29,7 @@ def apply_theme(theme: Literal["dark", "light"]):
|
|||||||
pg_widget.setBackground("k" if theme == "dark" else "w")
|
pg_widget.setBackground("k" if theme == "dark" else "w")
|
||||||
|
|
||||||
# now define stylesheet according to theme and apply it
|
# now define stylesheet according to theme and apply it
|
||||||
style = qdarkstyle.load_stylesheet(palette=get_theme_palette())
|
style = bec_qthemes.load_stylesheet(theme)
|
||||||
app.setStyleSheet(style)
|
app.setStyleSheet(style)
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class SpinnerWidget(QWidget):
|
|||||||
|
|
||||||
color_palette = get_theme_palette()
|
color_palette = get_theme_palette()
|
||||||
|
|
||||||
color = QColor(color_palette.COLOR_ACCENT_4)
|
color = QColor(color_palette.accent().color())
|
||||||
|
|
||||||
rect.adjust(line_width, line_width, -line_width, -line_width)
|
rect.adjust(line_width, line_width, -line_width, -line_width)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ dependencies = [
|
|||||||
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
|
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
|
||||||
"pydantic~=2.0",
|
"pydantic~=2.0",
|
||||||
"pyqtgraph~=0.13",
|
"pyqtgraph~=0.13",
|
||||||
"qdarkstyle>=3.2.2",
|
"bec_qthemes~=0.0",
|
||||||
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
|
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
|
||||||
"qtpy~=2.4",
|
"qtpy~=2.4",
|
||||||
"pyte", # needed for vt100 console
|
"pyte", # needed for vt100 console
|
||||||
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |