Changeset 49d019c in sasview for src/sans/guiframe/gui_manager.py


Ignore:
Timestamp:
Apr 5, 2014 5:28:53 AM (10 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
4d7e5d5
Parents:
9d6d5ba
Message:

Shorten the splash screen timeout. Fix data panel position on OSX.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/gui_manager.py

    rf7bead2 r49d019c  
    999999        size_t_bar = 70 
    10001000        if not IS_WIN: 
    1001             x_pos, _ = frame.GetPositionTuple() 
    10021001            if IS_LINUX: 
    10031002                size_t_bar = 115 
    1004             frame.SetPosition((x_pos, mac_pos_y + size_t_bar)) 
     1003            frame.SetPosition((0, mac_pos_y + size_t_bar)) 
    10051004        frame.Show(True) 
    10061005        #add data panel  
     
    10101009        self.panels["data_panel"] = data_panel 
    10111010        self._data_panel = data_panel 
    1012         w, h = self._get_panels_size(self._data_panel) 
    1013         win.SetSize((w, h)) 
     1011        d_panel_width, h = self._get_panels_size(self._data_panel) 
     1012        win.SetSize((d_panel_width, h)) 
    10141013        style = self.__gui_style & GUIFRAME.MANAGER_ON 
    10151014        if style != GUIFRAME.MANAGER_ON: 
     
    10181017            flag = True 
    10191018        if not IS_WIN: 
    1020             x_pos, _ = win.GetPositionTuple() 
    1021             win.SetPosition((x_pos, mac_pos_y + size_t_bar)) 
     1019            win.SetPosition((0, mac_pos_y + size_t_bar)) 
    10221020        win.Show(flag) 
    1023         d_panel_width = w 
    10241021        # Add the panels to the AUI manager 
    10251022        for panel_class in panels: 
     
    10461043            if not IS_WIN: 
    10471044                x_pos, _ = frame.GetPositionTuple() 
    1048                 frame.SetPosition((x_pos, mac_pos_y + size_t_bar)) 
     1045                frame.SetPosition((d_panel_width + 1, mac_pos_y + size_t_bar)) 
    10491046 
    10501047        if not IS_WIN: 
     
    16541651        panel_id = str(evt.GetId()) 
    16551652        self.on_set_plot_focus(self.panels[panel_id]) 
    1656         self.show_panel(evt.GetId(), 'on')       
    16571653        wx.CallLater(5*TIME_FACTOR, self.set_schedule(True)) 
    16581654        self.set_plot_unfocus() 
     
    17801776 
    17811777        self._default_save_location = os.path.dirname(path) 
    1782          
    1783     def show_panel(self, uid, show=None): 
    1784         """ 
    1785         Shows the panel with the given id 
    1786          
    1787         :param uid: unique ID number of the panel to show 
    1788          
    1789         """ 
    1790         #Not implemeted 
    1791         return 
    17921778         
    17931779    def load_state(self, path, is_project=False):    
     
    34103396        # case the splash screen disappears upon entering the event loop. 
    34113397        s_screen = wx.SplashScreen(bitmap=bm, 
    3412                          splashStyle=(wx.SPLASH_TIMEOUT| 
    3413                                               wx.SPLASH_CENTRE_ON_SCREEN), 
    3414                                  style=(wx.SIMPLE_BORDER| 
    3415                                         wx.FRAME_NO_TASKBAR| 
    3416                                         wx.FRAME_FLOAT_ON_PARENT), 
    3417                                          
    3418                         milliseconds=SS_MAX_DISPLAY_TIME, 
    3419                         parent=parent, 
    3420                         id=wx.ID_ANY) 
     3398                                   splashStyle=(wx.SPLASH_TIMEOUT| 
     3399                                                wx.SPLASH_CENTRE_ON_SCREEN), 
     3400                                   style=(wx.SIMPLE_BORDER| 
     3401                                          wx.FRAME_NO_TASKBAR| 
     3402                                          wx.FRAME_FLOAT_ON_PARENT), 
     3403                                   milliseconds=SS_MAX_DISPLAY_TIME, 
     3404                                   parent=parent, 
     3405                                   id=wx.ID_ANY) 
    34213406        from sans.guiframe.gui_statusbar import SPageStatusbar 
    34223407        statusBar = SPageStatusbar(s_screen) 
Note: See TracChangeset for help on using the changeset viewer.