background color of legend is not changed; fixes #141
This commit is contained in:
parent
aff9cd31a7
commit
735896e68d
@ -753,7 +753,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
if background is not None:
|
if background is not None:
|
||||||
self._bgcolor = mkColor(background)
|
self._bgcolor = mkColor(background)
|
||||||
self.graphic.setBackground(self._bgcolor)
|
self.graphic.setBackground(self._bgcolor)
|
||||||
self.legend.setBrush(self._bgcolor)
|
# self.legend.setBrush(self._bgcolor)
|
||||||
|
|
||||||
if foreground is not None:
|
if foreground is not None:
|
||||||
self._fgcolor = mkColor(foreground)
|
self._fgcolor = mkColor(foreground)
|
||||||
@ -770,7 +770,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
|
|||||||
self.show_legend()
|
self.show_legend()
|
||||||
|
|
||||||
title = self.plotItem.titleLabel.text
|
title = self.plotItem.titleLabel.text
|
||||||
if title is not None:
|
if title is not None and title != '':
|
||||||
self.plotItem.setTitle(title, **{'size': '10pt', 'color': self._fgcolor})
|
self.plotItem.setTitle(title, **{'size': '10pt', 'color': self._fgcolor})
|
||||||
|
|
||||||
x = self.plotItem.getAxis('bottom').labelText
|
x = self.plotItem.getAxis('bottom').labelText
|
||||||
|
Loading…
Reference in New Issue
Block a user