From 745d9c26be6aedad8c9a883844a4c8ceaff6bedd Mon Sep 17 00:00:00 2001 From: Henrik Kauppi Date: Thu, 3 Oct 2024 09:52:30 +0300 Subject: [PATCH] FIX: issue with small target guide icons when restoring state file with target set --- invesalius/data/viewer_volume.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index b3ef7cfb3..d0d026f49 100644 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -123,7 +123,12 @@ class Viewer(wx.Panel): def __init__(self, parent): - wx.Panel.__init__(self, parent, size=wx.Size(320, 320)) + display_size = wx.GetDisplaySize() + # Set the initial volume wx.Panel size as half the screen resolution to fix the issue + # with small target guide icons when loading a state file with target selected + x = int(display_size[0] / 2) + y = int(display_size[1] / 2) + wx.Panel.__init__(self, parent, size=wx.Size(x, y)) self.SetBackgroundColour(wx.Colour(0, 0, 0)) self.interaction_style = st.StyleStateManager()