Skip to content

Commit

Permalink
Merge pull request #6690 from VesnaT/update_axes_titles
Browse files Browse the repository at this point in the history
Visual settings Updater: Retain axis color
  • Loading branch information
janezd committed Jan 5, 2024
2 parents 6fec5d6 + b9b55ea commit f1dd3fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Orange/widgets/visualize/utils/customizableplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ def update_axes_titles_font(items: List[pg.AxisItem],
**settings: _SettingType):
for item in items:
font = Updater.change_font(item.label.font(), settings)
default_color = pg.mkPen(pg.getConfigOption("foreground"))
item.label.setFont(font)
fstyle = ["normal", "italic"][font.italic()]
style = {"font-size": f"{font.pointSize()}pt",
"font-family": f"{font.family()}",
"color": item.labelStyle.get("color", default_color),
"font-style": f"{fstyle}"}
item.setLabel(item.labelText, item.labelUnits,
item.labelUnitPrefix, **style)
Expand Down

0 comments on commit f1dd3fe

Please sign in to comment.