def _set_width_cb(self):
        """This function is called when the user enters a value into the
        'Width' entry field.  (this is only possible when 'Screen size' is
        unchecked)

        We calculate the height or aspect, depending on whether 'Lock aspect'
        is checked and update the shot generator viewer and UI.
        """
        wd, ht = self.get_wdht()
        aspect = self.get_aspect()
        if self._lock_aspect and aspect is not None:
            ht = int(round(wd * 1.0 / aspect))
            self.w.height.set_text(str(ht))
        else:
            _as = self.calc_aspect_str(wd, ht)
            self.w.aspect.set_text(_as)

        self.shot_generator.configure_surface(wd, ht)
        self._sg_wd, self._sg_ht = wd, ht
def _set_width_cb ( self ) : wd , ht = self . get_wdht ( ) aspect = self . get_aspect ( ) if self . _lock_aspect and aspect is not None : ht = int ( round ( wd * 1.0 / aspect ) ) self . w . height . set_text ( str ( ht ) ) else : _as = self . calc_aspect_str ( wd , ht ) self . w . aspect . set_text ( _as ) self . shot_generator . configure_surface ( wd , ht ) self . _sg_wd , self . _sg_ht = wd , ht
This function is called when the user enters a value into the
        'Width' entry field.  (this is only possible when 'Screen size' is
        unchecked)

        We calculate the height or aspect, depending on whether 'Lock aspect'
        is checked and update the shot generator viewer and UI.