Commit bc7f626771fd41a9b8ebec8d7d85c9d516d22f3d
1 parent
910323dd
Exists in
master
More improvements
Showing
1 changed file
with
3 additions
and
17 deletions
Show diff stats
invesalius/gui/preferences.py
... | ... | @@ -3,15 +3,7 @@ import invesalius.session as ses |
3 | 3 | import wx |
4 | 4 | from invesalius.gui.language_dialog import ComboBoxLanguage |
5 | 5 | from pubsub import pub as Publisher |
6 | - | |
7 | -try: | |
8 | - from agw import flatnotebook as fnb | |
9 | - | |
10 | - AGW = 1 | |
11 | -except ImportError: # if it's not there locally, try the wxPython lib. | |
12 | - import wx.lib.agw.flatnotebook as fnb | |
13 | - | |
14 | - AGW = 0 | |
6 | +import sys | |
15 | 7 | |
16 | 8 | |
17 | 9 | class Preferences(wx.Dialog): |
... | ... | @@ -22,13 +14,9 @@ class Preferences(wx.Dialog): |
22 | 14 | title=_("Preferences"), |
23 | 15 | style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER, |
24 | 16 | ): |
25 | - | |
26 | 17 | super().__init__(parent, id_, title, style=style) |
27 | 18 | |
28 | - bookStyle = fnb.FNB_NODRAG | fnb.FNB_NO_X_BUTTON | |
29 | - | |
30 | 19 | self.book = wx.Notebook(self, -1) |
31 | - | |
32 | 20 | self.pnl_viewer2d = Viewer2D(self.book) |
33 | 21 | self.pnl_viewer3d = Viewer3D(self.book) |
34 | 22 | # self.pnl_surface = SurfaceCreation(self) |
... | ... | @@ -44,16 +32,14 @@ class Preferences(wx.Dialog): |
44 | 32 | |
45 | 33 | min_width = max([i.GetMinWidth() for i in (self.book.GetChildren())]) |
46 | 34 | min_height = max([i.GetMinHeight() for i in (self.book.GetChildren())]) |
47 | - self.book.SetMinClientSize((min_width * 2, min_height * 2)) | |
35 | + if sys.platform.startswith('linux'): | |
36 | + self.book.SetMinClientSize((min_width * 2, min_height * 2)) | |
48 | 37 | |
49 | 38 | sizer = wx.BoxSizer(wx.VERTICAL) |
50 | 39 | sizer.Add(self.book, 1, wx.EXPAND | wx.ALL) |
51 | 40 | sizer.Add(btnsizer, 0, wx.GROW | wx.RIGHT | wx.TOP | wx.BOTTOM, 5) |
52 | 41 | self.SetSizerAndFit(sizer) |
53 | 42 | self.Layout() |
54 | - | |
55 | - | |
56 | - | |
57 | 43 | self.__bind_events() |
58 | 44 | |
59 | 45 | def __bind_events(self): | ... | ... |