From 1bbb3a3ae2e65660babb068088febf89cd187564 Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Wed, 5 Sep 2012 17:54:59 +0000 Subject: [PATCH] The fonts from dialog used to create a new surface were very small, it was because the parent of this dialog was setted --- invesalius/gui/data_notebook.py | 2 +- invesalius/gui/dialogs.py | 8 +++----- invesalius/gui/task_surface.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 9bd991a..ff8c86c 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -617,7 +617,7 @@ class SurfaceButtonControlPanel(wx.Panel): def OnNew(self): sl = slice_.Slice() - dialog = dlg.SurfaceCreationDialog(self, -1, + dialog = dlg.SurfaceCreationDialog(None, -1, _('InVesalius 3 - New surface'), mask_edited=sl.current_mask.was_edited) try: diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 7c8aa09..bd36573 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -1011,7 +1011,7 @@ class SurfaceCreationDialog(wx.Dialog): # method. pre = wx.PreDialog() pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) - pre.Create(parent, ID, title, pos, (50,30), style) + pre.Create(parent, ID, title, pos, (500,300), style) # This extra style can be set after the UI object has been created. if 'wxMac' in wx.PlatformInfo and useMetal: @@ -1028,12 +1028,12 @@ class SurfaceCreationDialog(wx.Dialog): self.nsd.Bind(EVT_MASK_SET, self.OnSetMask) surface_options_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, _('Surface creation options')), wx.VERTICAL) - surface_options_sizer.Add(self.nsd, 0, wx.EXPAND|wx.ALL, 5) + surface_options_sizer.Add(self.nsd, 1, wx.EXPAND|wx.ALL, 5) self.ca = SurfaceMethodPanel(self, -1, mask_edited) surface_method_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, _('Surface creation method')), wx.VERTICAL) - surface_method_sizer.Add(self.ca, 0, wx.EXPAND|wx.ALL, 5) + surface_method_sizer.Add(self.ca, 1, wx.EXPAND|wx.ALL, 5) btn_ok = wx.Button(self, wx.ID_OK) btn_ok.SetDefault() @@ -1055,8 +1055,6 @@ class SurfaceCreationDialog(wx.Dialog): self.SetSizer(sizer) sizer.Fit(self) - self.Show() - def OnSetMask(self, evt): mask = proj.Project().mask_dict[evt.mask_index] self.ca.mask_edited = mask.was_edited diff --git a/invesalius/gui/task_surface.py b/invesalius/gui/task_surface.py index 57d9c23..3fed642 100644 --- a/invesalius/gui/task_surface.py +++ b/invesalius/gui/task_surface.py @@ -132,7 +132,7 @@ class InnerTaskPanel(wx.Panel): def OnLinkNewSurface(self, evt=None): #import gui.dialogs as dlg sl = slice_.Slice() - dialog = dlg.SurfaceCreationDialog(self, -1, + dialog = dlg.SurfaceCreationDialog(None, -1, _('InVesalius 3 - New surface'), mask_edited=sl.current_mask.was_edited) -- libgit2 0.21.2