background color of legend is not changed; fixes #141

This commit is contained in:
Dominik Demuth 2023-11-13 17:11:38 +01:00
parent aff9cd31a7
commit 735896e68d

View File

@ -753,7 +753,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
if background is not None:
self._bgcolor = mkColor(background)
self.graphic.setBackground(self._bgcolor)
self.legend.setBrush(self._bgcolor)
# self.legend.setBrush(self._bgcolor)
if foreground is not None:
self._fgcolor = mkColor(foreground)
@ -770,7 +770,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
self.show_legend()
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})
x = self.plotItem.getAxis('bottom').labelText