if self.fit_type == MainWindowModel._VERTICAL_FIT:
            f = h / height
            if int(f*width) > w:
                h -= self.scroll_bar_size
                f = h / height