Skip to content

Commit

Permalink
Merge pull request #855 from henrikkauppi/fix-target-mode-coil-size
Browse files Browse the repository at this point in the history
FIX: issue with small target guide icons when restoring state file
  • Loading branch information
rmatsuda authored Oct 3, 2024
2 parents 31b7f2d + 745d9c2 commit 03fe34e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion invesalius/data/viewer_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 03fe34e

Please sign in to comment.