Commit fd0ab6bd0939d356ea10804f13cf29085639eb6d

Authored by Thiago Franco de Moraes
1 parent dfdc8ce8

Improvements on the MIP's interface

Showing 1 changed file with 10 additions and 2 deletions   Show diff stats
invesalius/data/viewer_slice.py
@@ -61,9 +61,15 @@ class ContourMIPConfig(wx.Panel): @@ -61,9 +61,15 @@ class ContourMIPConfig(wx.Panel):
61 def __init__(self, prnt, orientation): 61 def __init__(self, prnt, orientation):
62 wx.Panel.__init__(self, prnt) 62 wx.Panel.__init__(self, prnt)
63 self.mip_size_spin = wx.SpinCtrl(self, -1, min=1, max=240, initial=1) 63 self.mip_size_spin = wx.SpinCtrl(self, -1, min=1, max=240, initial=1)
  64 + w, h = self.mip_size_spin.GetTextExtent('M')
  65 + self.mip_size_spin.SetMinSize((4 * w + 10, -1))
  66 + self.mip_size_spin.SetMaxSize((4 * w + 10, -1))
64 self.border_spin = FS.FloatSpin(self, -1, min_val=0, max_val=10, 67 self.border_spin = FS.FloatSpin(self, -1, min_val=0, max_val=10,
65 - increment=0.01, value=0.1, 68 + increment=0.1, value=0.1, digits=1,
66 agwStyle=FS.FS_LEFT) 69 agwStyle=FS.FS_LEFT)
  70 + w, h = self.border_spin.GetTextExtent('M')
  71 + self.border_spin.SetMinSize((4 * w + 10, -1))
  72 + self.border_spin.SetMaxSize((4 * w + 10, -1))
67 self.inverted = wx.CheckBox(self, -1, "inverted") 73 self.inverted = wx.CheckBox(self, -1, "inverted")
68 74
69 txt_mip_size = wx.StaticText(self, -1, "MIP size", style=wx.ALIGN_CENTER_HORIZONTAL) 75 txt_mip_size = wx.StaticText(self, -1, "MIP size", style=wx.ALIGN_CENTER_HORIZONTAL)
@@ -72,8 +78,10 @@ class ContourMIPConfig(wx.Panel): @@ -72,8 +78,10 @@ class ContourMIPConfig(wx.Panel):
72 sizer = wx.BoxSizer(wx.HORIZONTAL) 78 sizer = wx.BoxSizer(wx.HORIZONTAL)
73 sizer.Add(txt_mip_size, 0, wx.EXPAND | wx.ALL, 2) 79 sizer.Add(txt_mip_size, 0, wx.EXPAND | wx.ALL, 2)
74 sizer.Add(self.mip_size_spin, 0, wx.EXPAND) 80 sizer.Add(self.mip_size_spin, 0, wx.EXPAND)
75 - sizer.Add(txt_mip_border, 0, wx.EXPAND) 81 + sizer.AddSpacer((10, 0))
  82 + sizer.Add(txt_mip_border, 0, wx.EXPAND | wx.ALL, 2)
76 sizer.Add(self.border_spin, 0, wx.EXPAND) 83 sizer.Add(self.border_spin, 0, wx.EXPAND)
  84 + sizer.AddSpacer((10, 0))
77 sizer.Add(self.inverted, 1, wx.EXPAND) 85 sizer.Add(self.inverted, 1, wx.EXPAND)
78 self.SetSizer(sizer) 86 self.SetSizer(sizer)
79 sizer.Fit(self) 87 sizer.Fit(self)