1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-04 16:02:51 +01:00

Revert "feat(themes): moved themes to bec_qthemes"

This reverts commit 3798714369
This commit is contained in:
2024-07-22 21:35:07 +02:00
parent 3798714369
commit fd6ae91993
3 changed files with 6 additions and 5 deletions

View File

@@ -2,10 +2,11 @@ import itertools
import re
from typing import Literal
import bec_qthemes
import numpy as np
import pyqtgraph as pg
import qdarkstyle
from pydantic_core import PydanticCustomError
from qdarkstyle import DarkPalette, LightPalette
from qtpy.QtGui import QColor
from qtpy.QtWidgets import QApplication
@@ -13,7 +14,7 @@ CURRENT_THEME = "dark"
def get_theme_palette():
return bec_qthemes.load_palette(CURRENT_THEME)
return DarkPalette if CURRENT_THEME == "dark" else LightPalette
def apply_theme(theme: Literal["dark", "light"]):
@@ -29,7 +30,7 @@ def apply_theme(theme: Literal["dark", "light"]):
pg_widget.setBackground("k" if theme == "dark" else "w")
# now define stylesheet according to theme and apply it
style = bec_qthemes.load_stylesheet(theme)
style = qdarkstyle.load_stylesheet(palette=get_theme_palette())
app.setStyleSheet(style)

View File

@@ -55,7 +55,7 @@ class SpinnerWidget(QWidget):
color_palette = get_theme_palette()
color = QColor(color_palette.accent())
color = QColor(color_palette.COLOR_ACCENT_4)
rect.adjust(line_width, line_width, -line_width, -line_width)

View File

@@ -19,7 +19,7 @@ dependencies = [
"isort~=5.13, >=5.13.2", # needed for bw-generate-cli
"pydantic~=2.0",
"pyqtgraph~=0.13",
"bec_qthemes~=0.0",
"qdarkstyle>=3.2.2",
"qtconsole~=5.5, >=5.5.1", # needed for jupyter console
"qtpy~=2.4",
"pyte", # needed for vt100 console