original_docstring: get the new aspect ratio to resize the mainframe
docstring: get the new aspect ratio to resize the mainframe
docstring_tokens: get the new aspect ratio to resize the mainframe
code: def recalcAspectRatio(self, window):
          """get the new aspect ratio to resize the mainframe"""
          # set the mainframe size to the window borders again
          self.frameMain["frameSize"] = (
              base.a2dLeft, base.a2dRight,
              base.a2dTop, base.a2dBottom)
  
          # calculate new aspec tratio
          wp = window.getProperties()
          aspX = 1.0
          aspY = 1.0
          wpXSize = wp.getXSize()
          wpYSize = wp.getYSize()
          if wpXSize > wpYSize:
              aspX = wpXSize / float(wpYSize)
          else:
              aspY = wpYSize / float(wpXSize)
          # calculate new position/size/whatever of the gui items
          self.title.setPos(0.0, 0.0, base.a2dTop - self.textscale)
          self.menuBackground.setScale(1.0 * aspX, 1.0, 1.0 * aspY)
          self.cbVolumeMute.setPos(base.a2dRight - 0.15, 0, base.a2dBottom + 0.15)
code_tokens: def recalcAspectRatio ( self , window ) : self . frameMain [ "frameSize" ] = ( base . a2dLeft , base . a2dRight , base . a2dTop , base . a2dBottom ) wp = window . getProperties ( ) aspX = 1.0 aspY = 1.0 wpXSize = wp . getXSize ( ) wpYSize = wp . getYSize ( ) if wpXSize > wpYSize : aspX = wpXSize / float ( wpYSize ) else : aspY = wpYSize / float ( wpXSize ) self . title . setPos ( 0.0 , 0.0 , base . a2dTop - self . textscale ) self . menuBackground . setScale ( 1.0 * aspX , 1.0 , 1.0 * aspY ) self . cbVolumeMute . setPos ( base . a2dRight - 0.15 , 0 , base . a2dBottom + 0.15 )
short_docstring: get the new aspect ratio to resize the mainframe
short_docstring_tokens: get the new aspect ratio to resize the mainframe
comment: """get the new aspect ratio to resize the mainframe"""$SEP$# set the mainframe size to the window borders again$SEP$# calculate new aspec tratio$SEP$# calculate new position/size/whatever of the gui items