clean up
This commit is contained in:
@ -1,24 +1,29 @@
|
|||||||
from PyQt5.QtCore import Qt
|
|
||||||
from PyQt5.QtGui import QPalette, QColor
|
from PyQt5.QtGui import QPalette, QColor
|
||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
|
|
||||||
|
|
||||||
WHITE = Qt.white
|
def QGrey(i):
|
||||||
|
return QColor(i, i, i)
|
||||||
|
|
||||||
|
|
||||||
VIOLET = QColor("#792953")
|
VIOLET = QColor("#792953")
|
||||||
BLUE = QColor("#003e6e")
|
BLUE = QColor("#003e6e")
|
||||||
|
|
||||||
HIGHLIGHT = VIOLET
|
HIGHLIGHT = VIOLET
|
||||||
|
|
||||||
GREY0 = QColor(25, 25, 25) # dark
|
GREY0 = QGrey(25) # dark
|
||||||
GREY1 = QColor(35, 35, 35)
|
GREY1 = QGrey(35)
|
||||||
GREY2 = QColor(50, 50, 50)
|
GREY2 = QGrey(50)
|
||||||
GREY3 = QColor(125, 125, 125)
|
GREY3 = QGrey(125)
|
||||||
GREY4 = QColor(200, 200, 200) # light
|
GREY4 = QGrey(150)
|
||||||
|
GREY5 = QGrey(200) # light
|
||||||
|
|
||||||
MDI_BKG = QColor(150, 150, 150)
|
WHITE = QGrey(255)
|
||||||
|
|
||||||
DOT_PEN = GREY4
|
|
||||||
|
MDI_BKG = GREY4
|
||||||
|
|
||||||
|
DOT_PEN = GREY5
|
||||||
DOT_BRUSH = HIGHLIGHT
|
DOT_BRUSH = HIGHLIGHT
|
||||||
DOT_SIZE = 8
|
DOT_SIZE = 8
|
||||||
|
|
||||||
@ -68,13 +73,13 @@ def make_palette():
|
|||||||
|
|
||||||
|
|
||||||
def apply_pg():
|
def apply_pg():
|
||||||
pg.setConfigOption("foreground", "w")
|
pg.setConfigOption("foreground", WHITE)
|
||||||
pg.setConfigOption("background", GREY0)
|
pg.setConfigOption("background", GREY0)
|
||||||
|
|
||||||
|
|
||||||
def pg_plot_style():
|
def pg_plot_style():
|
||||||
pen = pg.mkPen(
|
pen = pg.mkPen(
|
||||||
GREY4,
|
DOT_PEN,
|
||||||
width=3
|
width=3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user