Commit fd0ab6bd0939d356ea10804f13cf29085639eb6d
1 parent
dfdc8ce8
Exists in
master
and in
56 other branches
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 | 61 | def __init__(self, prnt, orientation): |
| 62 | 62 | wx.Panel.__init__(self, prnt) |
| 63 | 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 | 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 | 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 | 73 | self.inverted = wx.CheckBox(self, -1, "inverted") |
| 68 | 74 | |
| 69 | 75 | txt_mip_size = wx.StaticText(self, -1, "MIP size", style=wx.ALIGN_CENTER_HORIZONTAL) |
| ... | ... | @@ -72,8 +78,10 @@ class ContourMIPConfig(wx.Panel): |
| 72 | 78 | sizer = wx.BoxSizer(wx.HORIZONTAL) |
| 73 | 79 | sizer.Add(txt_mip_size, 0, wx.EXPAND | wx.ALL, 2) |
| 74 | 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 | 83 | sizer.Add(self.border_spin, 0, wx.EXPAND) |
| 84 | + sizer.AddSpacer((10, 0)) | |
| 77 | 85 | sizer.Add(self.inverted, 1, wx.EXPAND) |
| 78 | 86 | self.SetSizer(sizer) |
| 79 | 87 | sizer.Fit(self) | ... | ... |