def set_default_size(self, default_width, default_height): ''' Set the default size of the window. @param default_width: Default width in pixels of the application, once set, application don't allow smaller than width. @param default_height: Default height in pixels of the application, once set, application don't allow smaller than height. ''' self.window.set_default_size(default_width, default_height) if self.resizable: self.window.set_geometry_hints( None, default_width, # minimum width default_height # minimum height -1, -1, -1, -1, -1, -1, -1, -1 ) else: self.window.set_geometry_hints( None, default_width, # minimum width default_height, # minimum height default_width, default_height, -1, -1, -1, -1, -1, -1 ) # Pass application size to skin config. skin_config.set_application_window_size(default_width, default_height)
def set_default_size(self, default_width, default_height): '''Set application default size.''' self.window.set_default_size(default_width, default_height) self.window.set_geometry_hints( None, default_width, # minimum width default_height # minimum height -1, -1, -1, -1, -1, -1, -1, -1 ) # Pass application size to skin config. skin_config.set_application_window_size(default_width, default_height)
def set_default_size(self, default_width, default_height): ''' Set the default size of the window. @param default_width: Default width in pixels of the application, once set, application don't allow smaller than width. @param default_height: Default height in pixels of the application, once set, application don't allow smaller than height. ''' self.window.set_default_size(default_width, default_height) if self.resizable: self.window.set_geometry_hints( None, default_width, # minimum width default_height # minimum height - 1, -1, -1, -1, -1, -1, -1, -1) else: self.window.set_geometry_hints( None, default_width, # minimum width default_height, # minimum height default_width, default_height, -1, -1, -1, -1, -1, -1) # Pass application size to skin config. skin_config.set_application_window_size(default_width, default_height)