0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix(plot_base): legend text color is changed when changing dark-light theme

This commit is contained in:
2024-11-05 10:33:46 +01:00
committed by wyzula_j
parent c6e48ec1fe
commit 2304c9f849

View File

@ -147,6 +147,9 @@ class BECPlotBase(BECConnector, pg.GraphicsLayout):
for axis in ["left", "bottom", "right", "top"]:
self.plot_item.getAxis(axis).setPen(text_pen)
self.plot_item.getAxis(axis).setTextPen(text_pen)
if self.plot_item.legend is not None:
for sample, label in self.plot_item.legend.items:
label.setText(label.text, color=palette.text().color())
def set(self, **kwargs) -> None:
"""