Changeset 9f9bb88 in sasview
- Timestamp:
- May 4, 2012 10:52:32 AM (13 years ago)
- 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:
- 805bfe9
- Parents:
- bf0acea
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r56acb5d r9f9bb88 174 174 DEFAULT_STYLE = config.DEFAULT_STYLE 175 175 176 177 PLOPANEL_HEIGTH = config.PLOPANEL_HEIGTH178 DATAPANEL_HEIGHT = config.DATAPANEL_HEIGHT179 176 PLUGIN_STATE_EXTENSIONS = config.PLUGIN_STATE_EXTENSIONS 180 177 OPEN_SAVE_MENU = config.OPEN_SAVE_PROJECT_MENU … … 878 875 get the proper panel width and height 879 876 """ 880 panel_height_min = self._window_height 881 panel_width_min = self._window_width 877 ## Check and set the size 878 if DATAPANEL_WIDTH < 0: 879 panel_width = int(self._window_width * 0.22) 880 else: 881 panel_width = DATAPANEL_WIDTH 882 panel_height = int(self._window_height * 0.9) 882 883 style = self.__gui_style & (GUIFRAME.MANAGER_ON) 883 884 if self._data_panel is not None and (p == self._data_panel): 884 panel_width_min = DATAPANEL_WIDTH 885 panel_height_min = self._window_height * 0.8 886 return panel_width_min, panel_height_min 885 return panel_width, panel_height 887 886 if hasattr(p, "CENTER_PANE") and p.CENTER_PANE: 888 887 style = self.__gui_style & (GUIFRAME.PLOTTING_ON|GUIFRAME.MANAGER_ON) 889 888 if style == (GUIFRAME.PLOTTING_ON|GUIFRAME.MANAGER_ON): 890 panel_width_min = self._window_width -\ 891 (DATAPANEL_WIDTH +config.PLOPANEL_WIDTH) 892 return panel_width_min, panel_height_min 893 return panel_width_min, panel_height_min 889 panel_width = self._window_width - panel_width 890 return panel_width, panel_height 891 return panel_width, panel_height 894 892 895 893 def _load_panels(self): … … 947 945 p = panel_class 948 946 id = wx.NewId() 949 #w, h = self._get_panels_size(p)950 947 # Check whether we need to put this panel 951 948 # in the center pane … … 1086 1083 style1 = self.__gui_style & GUIFRAME.FIXED_PANEL 1087 1084 style2 = self.__gui_style & GUIFRAME.FLOATING_PANEL 1085 1086 ## Check and set the size 1087 if PLOPANEL_WIDTH < 0: 1088 p_panel_width = int(self._window_width * 0.36) 1089 else: 1090 p_panel_width = PLOPANEL_WIDTH 1091 p_panel_height = int(p_panel_width * 0.75) 1092 1088 1093 if style1 == GUIFRAME.FIXED_PANEL: 1089 1094 self._mgr.AddPane(p, wx.aui.AuiPaneInfo(). … … 1098 1103 # Use a large best size to make sure the AUI 1099 1104 # manager takes all the available space 1100 BestSize(wx.Size(PLOPANEL_WIDTH, 1101 PLOPANEL_HEIGTH))) 1102 1105 BestSize(wx.Size(p_panel_width, 1106 p_panel_height))) 1103 1107 self._popup_fixed_panel(p) 1104 1108 … … 1110 1114 # Use a large best size to make sure the AUI 1111 1115 # manager takes all the available space 1112 BestSize(wx.Size( PLOPANEL_WIDTH,1113 PLOPANEL_HEIGTH)))1116 BestSize(wx.Size(p_panel_width, 1117 p_panel_height))) 1114 1118 1115 1119 self._popup_floating_panel(p) 1116 1117 1120 # Register for closing of panels 1118 1121 self.Bind(wx.aui.EVT_AUI_PANE_CLOSE, self.on_panel_close) … … 2848 2851 style = self.__gui_style & GUIFRAME.FIXED_PANEL 2849 2852 if style == GUIFRAME.FIXED_PANEL: 2850 self._mgr.GetPane(p.window_name).Dock() 2851 self._mgr.GetPane(p.window_name).Floatable() 2852 self._mgr.GetPane(p.window_name).Right() 2853 self._mgr.GetPane(p.window_name).TopDockable(False) 2854 self._mgr.GetPane(p.window_name).BottomDockable(False) 2855 self._mgr.GetPane(p.window_name).LeftDockable(False) 2856 self._mgr.GetPane(p.window_name).RightDockable(True) 2853 pane = self._mgr.GetPane(p.window_name) 2854 pane.Dock() 2855 pane.Floatable() 2856 pane.Right() 2857 pane.TopDockable(False) 2858 pane.BottomDockable(False) 2859 pane.LeftDockable(False) 2860 pane.RightDockable(True) 2857 2861 self._mgr.Update() 2858 2862 … … 2862 2866 style = self.__gui_style & GUIFRAME.FLOATING_PANEL 2863 2867 if style == GUIFRAME.FLOATING_PANEL: 2864 self._mgr.GetPane(p.window_name).Floatable(True) 2865 self._mgr.GetPane(p.window_name).Float() 2866 self._mgr.GetPane(p.window_name).Dockable(False) 2868 pane = self._mgr.GetPane(p.window_name) 2869 pane.Floatable(True) 2870 pane.Float() 2871 pane.Dockable(False) 2867 2872 self._mgr.Update() 2868 2873 … … 3478 3483 customWidth, customHeight = size 3479 3484 3480 # If the custom screen is bigger than the 3481 # window screen than make maximum size 3482 if customWidth > displayWidth: 3483 customWidth = displayWidth 3484 if customHeight > displayHeight: 3485 customHeight = displayHeight 3485 # If the custom size is default, set 90% of the screen size 3486 if customWidth < 0 and customHeight < 0: 3487 customWidth = displayWidth * 0.9 3488 customHeight = displayHeight * 0.9 3489 else: 3490 # If the custom screen is bigger than the 3491 # window screen than make maximum size 3492 if customWidth > displayWidth: 3493 customWidth = displayWidth 3494 if customHeight > displayHeight: 3495 customHeight = displayHeight 3486 3496 3487 3497 # Note that when running Linux and using an Xming (X11) server on a PC … … 3494 3504 # If dual screen registered as 1 screen. Make width half. 3495 3505 if displayWidth > (displayHeight*2): 3496 customWidth = displayWidth/2 3506 if (customWidth == displayWidth): 3507 customWidth = displayWidth/2 3508 # and set the position to be the corner of the screen. 3497 3509 posX = 0 3498 3510 posY = 0 … … 3504 3516 3505 3517 # Return the suggested position and size for the application frame. 3506 return (posX, posY), ( min(displayWidth, customWidth), min(displayHeight, customHeight))3518 return (posX, posY), (customWidth, customHeight) 3507 3519 3508 3520 -
sansview/custom_config.py
r7343319 r9f9bb88 2 2 Application appearance custom configuration 3 3 """ 4 DATAPANEL_WIDTH = 2604 DATAPANEL_WIDTH = -1 5 5 CLEANUP_PLOT = False 6 6 FIXED_PANEL = True 7 PLOPANEL_WIDTH = 4207 PLOPANEL_WIDTH = -1 8 8 DATALOADER_SHOW = True 9 GUIFRAME_HEIGHT = 84010 GUIFRAME_WIDTH = 11809 GUIFRAME_HEIGHT = -1 10 GUIFRAME_WIDTH = -1 11 11 DEFAULT_OPEN_FOLDER = None 12 12 WELCOME_PANEL_SHOW = False
Note: See TracChangeset
for help on using the changeset viewer.