Changeset 2ad3601 in sasview
- Timestamp:
- May 7, 2012 5:49:21 PM (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:
- 6306f2f
- Parents:
- 3764dbd7
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r6b53d2e r2ad3601 3349 3349 When initialised 3350 3350 """ 3351 pos, size = self.window_placement((GUIFRAME_WIDTH,3351 pos, size, self.is_max = self.window_placement((GUIFRAME_WIDTH, 3352 3352 GUIFRAME_HEIGHT)) 3353 3353 self.frame = ViewerFrame(parent=None, … … 3385 3385 3386 3386 return True 3387 3388 def maximize_win(self): 3389 """ 3390 Maximize the window after the frame shown 3391 """ 3392 if self.is_max: 3393 if self.frame.IsShown(): 3394 # Max window size 3395 self.frame.Maximize(self.is_max) 3387 3396 3388 3397 def open_file(self): … … 3472 3481 placed on the left side of the screen. 3473 3482 """ 3474 3483 is_maximized = False 3475 3484 # Get size of screen without 3476 3485 for screenCount in range(wx.Display().GetCount()): … … 3484 3493 3485 3494 # If the custom size is default, set 90% of the screen size 3486 if customWidth < 0 and customHeight < 0: 3495 if customWidth <= 0 and customHeight <= 0: 3496 if customWidth == 0 and customHeight == 0: 3497 is_maximized = True 3487 3498 customWidth = displayWidth * 0.9 3488 3499 customHeight = displayHeight * 0.9 … … 3516 3527 3517 3528 # Return the suggested position and size for the application frame. 3518 return (posX, posY), (customWidth, customHeight) 3529 return (posX, posY), (customWidth, customHeight), is_maximized 3519 3530 3520 3531 … … 3562 3573 self.frame.Show(True) 3563 3574 event.Skip() 3575 self.maximize_win() 3564 3576 3565 3577 if __name__ == "__main__": -
sansguiframe/src/sans/guiframe/startup_configuration.py
rbf0acea r2ad3601 117 117 """ 118 118 event.Skip() 119 120 gui_pw, gui_ph = self.parent.GetSizeTuple() 119 if self.parent.IsMaximized(): 120 gui_pw, gui_ph = (0, 0) 121 else: 122 gui_pw, gui_ph = self.parent.GetSizeTuple() 121 123 self.current_string['GUIFRAME_WIDTH'] = gui_pw 122 124 self.current_string['GUIFRAME_HEIGHT'] = gui_ph
Note: See TracChangeset
for help on using the changeset viewer.