Commit 2c5267ea82141e1cc0de7353bbda6993576331d7
1 parent
3d7e12f3
Exists in
master
Increased the size of spinctrl
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
invesalius/gui/widgets/inv_spinctrl.py
... | ... | @@ -76,10 +76,12 @@ class InvSpinCtrl(wx.Panel): |
76 | 76 | def SetMin(self, min_value): |
77 | 77 | self._min_value = min_value |
78 | 78 | self.SetValue(self._value) |
79 | + self.CalcSizeFromTextSize() | |
79 | 80 | |
80 | 81 | def SetMax(self, max_value): |
81 | 82 | self._max_value = max_value |
82 | 83 | self.SetValue(self._value) |
84 | + self.CalcSizeFromTextSize() | |
83 | 85 | |
84 | 86 | def SetRange(self, min_value, max_value): |
85 | 87 | self.SetMin(min_value) |
... | ... | @@ -108,7 +110,7 @@ class InvSpinCtrl(wx.Panel): |
108 | 110 | # To calculate best width to spinctrl |
109 | 111 | if text is None: |
110 | 112 | text = "{}".format( |
111 | - max(len(str(self._max_value)), len(str(self._min_value))) * "M" | |
113 | + max(len(str(self._max_value)), len(str(self._min_value)), 5) * "M" | |
112 | 114 | ) |
113 | 115 | |
114 | 116 | dc = wx.WindowDC(self) | ... | ... |