Changeset 0f7c930 in sasview for src/sas


Ignore:
Timestamp:
Oct 10, 2016 11:04:50 PM (8 years ago)
Author:
butler
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
46dfee9
Parents:
278178b
Message:

force resize of panel (self.FitInside?()) when the button sizer expands
due to user action. Also puts buttons in two rows so not usually a
problem anyway now. Fixes #616

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py

    rd0248bd r0f7c930  
    181181        self.hint_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    182182        self.qrange_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    183         self.button_sizer = wx.BoxSizer(wx.HORIZONTAL) 
     183        self.button_sizer = wx.BoxSizer(wx.VERTICAL) 
     184        self.button_sizer1 = wx.BoxSizer(wx.HORIZONTAL) 
     185        self.button_sizer2 = wx.BoxSizer(wx.HORIZONTAL) 
    184186 
    185187    def _layout_data_name(self): 
     
    392394        self.bt_close.SetToolTipString("Close this window") 
    393395 
    394         self.button_sizer.AddMany([(self.time_text , 0, wx.LEFT, 20), 
    395                                    (self.orient_combo , 0, wx.LEFT, 20), 
    396                                    (self.bt_compute, 0, wx.LEFT, 20), 
     396        self.button_sizer1.AddMany([(self.bt_compute, 0, wx.LEFT, 20), 
     397                                   (self.orient_combo , 0, wx.LEFT, 20)]) 
     398        self.button_sizer2.AddMany([(self.time_text , 0, wx.LEFT, 20), 
    397399                                   (self.bt_help, 0, wx.LEFT, 20), 
    398                                    (self.bt_close, 0, wx.LEFT, 5)]) 
     400                                   (self.bt_close, 0, wx.LEFT, 20)]) 
     401        self.button_sizer.AddMany([(self.button_sizer1 , 0, wx.BOTTOM|wx.LEFT, 10), 
     402                                   (self.button_sizer2 , 0, wx.LEFT, 10)]) 
    399403 
    400404    def estimate_ctime(self): 
     
    600604                raise 
    601605            self.orient_combo.Show(is_pdbdata) 
    602             self.button_sizer.Layout() 
     606            #self.button_sizer.Layout() 
     607            self.FitInside() 
    603608            self._set_sld_data_helper(True) 
    604609        except: 
Note: See TracChangeset for help on using the changeset viewer.