Changeset 657490af in sasview for fittingview


Ignore:
Timestamp:
Oct 21, 2011 3:08:45 PM (13 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5531a46
Parents:
18476d6
Message:

make sure data selection dialog is well formatted for mac

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitting_widgets.py

    r49c69de r657490af  
    1414from wx.lib.scrolledpanel import ScrolledPanel 
    1515 
    16 WIDTH = 400 
    17 HEIGHT = 300 
     16 
    1817MAX_NBR_DATA = 4 
     18WIDTH = 430 
     19HEIGHT = 350 
    1920 
     21class DialogPanel(ScrolledPanel): 
     22    def __init__(self, *args, **kwds): 
     23        ScrolledPanel.__init__(self, *args, **kwds) 
     24        self.SetupScrolling() 
     25         
    2026class BatchDataDialog(wx.Dialog): 
    2127    """ 
     
    2632    def __init__(self, parent=None,  *args, **kwds): 
    2733        wx.Dialog.__init__(self, parent, *args, **kwds) 
    28         self.SetSize((WIDTH, 250)) 
     34        self.SetSize((WIDTH, HEIGHT)) 
    2935        self.data_1d_selected = None 
    3036        self.data_2d_selected = None 
     
    7076        vbox.Add(button_sizer, 0 , wx.TOP|wx.BOTTOM, 10) 
    7177        self.SetSizer(vbox) 
     78        self.Layout() 
    7279         
    7380    def get_data(self): 
     
    99106        select_data_text = " %s Data selected.\n" % str(self._nb_selected_data) 
    100107        self._data_text_ctrl = wx.StaticText(self, -1, str(select_data_text)) 
     108                                
    101109        self._data_text_ctrl.SetForegroundColour('blue') 
    102110        self._sizer_main = wx.BoxSizer(wx.VERTICAL) 
     
    104112        self._sizer_button = wx.BoxSizer(wx.HORIZONTAL) 
    105113        self._choice_sizer = wx.GridBagSizer(5, 5) 
    106         self._panel = ScrolledPanel(self, style=wx.RAISED_BORDER, 
    107                                size=(WIDTH-20, HEIGHT-50)) 
    108         self._panel.SetupScrolling() 
     114        self._panel = DialogPanel(self, style=wx.RAISED_BORDER, 
     115                               size=(WIDTH-20, HEIGHT/3)) 
    109116        self.__do_layout(data_list, text=text) 
    110117         
     
    150157        static_line = wx.StaticLine(self, -1) 
    151158         
    152         self._sizer_txt.Add(self._panel, 1, wx.EXPAND|wx.LEFT|wx.RIGHT, 5) 
    153         self._sizer_main.Add(self._sizer_txt, 1, wx.EXPAND|wx.ALL, 10) 
    154         self._sizer_main.Add(self._data_text_ctrl, 0,  
    155                              wx.EXPAND|wx.LEFT|wx.RIGHT, 10) 
     159        self._sizer_txt.Add(self._panel, 0, wx.EXPAND|wx.ALL, 10) 
     160        self._sizer_main.Add(self._sizer_txt, 0, wx.EXPAND|wx.ALL, 10) 
     161        self._sizer_main.Add(self._data_text_ctrl, 0,  wx.EXPAND|wx.ALL, 10) 
    156162        self._sizer_main.Add(static_line, 0, wx.EXPAND, 0) 
    157163        self._sizer_main.Add(self._sizer_button, 0, wx.EXPAND|wx.ALL, 10) 
Note: See TracChangeset for help on using the changeset viewer.