diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-03-30 04:29:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-30 06:29:39 +0200 |
| commit | 2d18a061e3427aecb06506944f68539270f497e9 (patch) | |
| tree | 03be704ef356cff466347dc225cc12682c4cffea /lib | |
| parent | 7ae5a4b91b1c8a738e0f36c9fbbf52c688f4d989 (diff) | |
macOS Ventura: update background color (#3621)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gui/simulator/drawing_panel.py | 3 | ||||
| -rw-r--r-- | lib/gui/simulator/view_panel.py | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/gui/simulator/drawing_panel.py b/lib/gui/simulator/drawing_panel.py index 1ffdfaa4..745bd464 100644 --- a/lib/gui/simulator/drawing_panel.py +++ b/lib/gui/simulator/drawing_panel.py @@ -307,8 +307,7 @@ class DrawingPanel(wx.Panel): def set_background_color(self, color): self.background_color = color - # this refresh is necessary for macOS - self.Refresh() + self._update_background_color() def _update_background_color(self): if not self.page_specs: diff --git a/lib/gui/simulator/view_panel.py b/lib/gui/simulator/view_panel.py index b73d6a4c..e2f2618d 100644 --- a/lib/gui/simulator/view_panel.py +++ b/lib/gui/simulator/view_panel.py @@ -146,8 +146,10 @@ class ViewPanel(ScrolledPanel): self.drawing_panel = drawing_panel def on_update_background_color(self, event): - self.set_background_color(event.Colour) - self.drawing_panel.set_background_color(event.Colour) + color = event.Colour + self.set_background_color(color) + self.drawing_panel.set_background_color(color) + self.drawing_panel.Refresh() def set_background_color(self, color): self.btnBackgroundColor.SetColour(color) |
