[minor] some updates, added bright style sheet

This commit is contained in:
Marcel Paffrath 2017-09-07 16:51:56 +02:00
parent 9c63621ba4
commit cacfb37468
4 changed files with 10 additions and 11 deletions

View File

@ -555,6 +555,8 @@ class MainWindow(QMainWindow):
# init style # init style
self.set_style('dark') self.set_style('dark')
#self.set_style('bright')
#self.set_style('default')
# add event combo box and ref/test buttons # add event combo box and ref/test buttons
self.eventBox = self.createEventBox() self.eventBox = self.createEventBox()
@ -668,7 +670,7 @@ class MainWindow(QMainWindow):
def init_styles(self): def init_styles(self):
self._styles = {} self._styles = {}
styles = ['default', 'dark'] styles = ['default', 'dark', 'bright']
stylecolors = style_settings.stylecolors stylecolors = style_settings.stylecolors
for style in styles: for style in styles:
if style in stylecolors.keys(): if style in stylecolors.keys():
@ -1604,7 +1606,8 @@ class MainWindow(QMainWindow):
self.getPlotWidget().updateWidget() self.getPlotWidget().updateWidget()
plots = self.wfp_thread.data plots = self.wfp_thread.data
for times, data in plots: for times, data in plots:
self.dataPlot.plotWidget.getPlotItem().plot(times, data)#, pen='k') self.dataPlot.plotWidget.getPlotItem().plot(times, data,
pen=self.dataPlot.pen_linecolor)
self.dataPlot.reinitMoveProxy() self.dataPlot.reinitMoveProxy()
self.dataPlot.plotWidget.showAxis('left') self.dataPlot.plotWidget.showAxis('left')
self.dataPlot.plotWidget.showAxis('bottom') self.dataPlot.plotWidget.showAxis('bottom')

View File

@ -442,13 +442,14 @@ class WaveformWidgetPG(QtGui.QWidget):
self.plotWidget.hideAxis('bottom') self.plotWidget.hideAxis('bottom')
self.plotWidget.hideAxis('left') self.plotWidget.hideAxis('left')
self.wfstart, self.wfend = 0, 0 self.wfstart, self.wfend = 0, 0
self.pen = self.pg.mkPen(self.parent()._style['multicursor']['rgba']) self.pen_multicursor = self.pg.mkPen(self.parent()._style['multicursor']['rgba'])
self.pen_linecolor = self.pg.mkPen(self.parent()._style['linecolor']['rgba'])
self.reinitMoveProxy() self.reinitMoveProxy()
self._proxy = self.pg.SignalProxy(self.plotWidget.scene().sigMouseMoved, rateLimit=60, slot=self.mouseMoved) self._proxy = self.pg.SignalProxy(self.plotWidget.scene().sigMouseMoved, rateLimit=60, slot=self.mouseMoved)
def reinitMoveProxy(self): def reinitMoveProxy(self):
self.vLine = self.pg.InfiniteLine(angle=90, movable=False, pen=self.pen) self.vLine = self.pg.InfiniteLine(angle=90, movable=False, pen=self.pen_multicursor)
self.hLine = self.pg.InfiniteLine(angle=0, movable=False, pen=self.pen) self.hLine = self.pg.InfiniteLine(angle=0, movable=False, pen=self.pen_multicursor)
self.plotWidget.addItem(self.vLine, ignoreBounds=True) self.plotWidget.addItem(self.vLine, ignoreBounds=True)
self.plotWidget.addItem(self.hLine, ignoreBounds=True) self.plotWidget.addItem(self.hLine, ignoreBounds=True)

View File

@ -15,11 +15,6 @@ border-width: 2px;
border-style:inset; border-style:inset;
} }
FigureCanvasQtAgg{
background-color: rgba(50, 50, 60, 255);
color: rgba(255, 255, 255, 255);
}
QComboBox{ QComboBox{
background-color: rgba(80, 80, 90, 255); background-color: rgba(80, 80, 90, 255);
color: rgba(255, 255, 255, 255); color: rgba(255, 255, 255, 255);

View File

@ -40,7 +40,7 @@ stylecolors = {
}, },
'dark': { 'dark': {
'linecolor': { 'linecolor': {
'rgba': (255, 255, 255, 255)}, 'rgba': (230, 230, 230, 255)},
'background': { 'background': {
'rgba': (50, 50, 60, 255)}, 'rgba': (50, 50, 60, 255)},
'multicursor': { 'multicursor': {