From: Urban Wallasch Date: Wed, 12 May 2021 18:39:26 +0000 (+0200) Subject: * Shrink grid size, if not enough thumbnails to fill initial dimensions. X-Git-Tag: v0.3~81 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=59b5fe24ace7565d3740e944d5c49bd78115fb04;p=ffpreview.git * Shrink grid size, if not enough thumbnails to fill initial dimensions. --- diff --git a/ffpreview.py b/ffpreview.py index 6b813cd..108be53 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -465,6 +465,10 @@ class sMainWindow(QMainWindow): x += 1 if x >= cfg['grid_columns']: x = 0; y += 1 + if y < cfg['grid_rows']: + cfg['grid_rows'] = y + 1 + if y == 0 and x < cfg['grid_columns']: + cfg['grid_columns'] = x self.scrollframe.setUpdatesEnabled(True) self.set_cursor()