home · contact · privacy
Don't lower-end per-rows config choices to GALLERY_PER_ROW_DEFAULT.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 23 Apr 2026 21:11:16 +0000 (23:11 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 23 Apr 2026 21:11:16 +0000 (23:11 +0200)
browser/config_constants.py
browser/gallery_config.py

index e635065f8288f60a229f1408b7cdaf8a37ba7150..2ca9a54b2cd45c3da052b1ed3c768151f0150df6 100644 (file)
@@ -1,6 +1,7 @@
 """Configuration-ready constants."""
 
 GALLERY_PER_ROW_DEFAULT = 5
+GALLERY_PER_ROW_MAX = 32
 GTK_APP_ID = 'plomlompom.com.StablePixBrowser.App'
 CACHE_PATH = 'cache.json'
 BOOKMARKS_PATH = 'bookmarks.json'
index cbd77ab3ad855ee48a26268e498185f65bdb1d18..50bb0e86ee17ac9ce17de5c0835cfcf6c42de6a9 100644 (file)
@@ -4,7 +4,8 @@ from re import search as re_search
 from typing import Callable, Optional, Self
 import gi  # type: ignore
 
-from browser.config_constants import GALLERY_PER_ROW_DEFAULT
+from browser.config_constants import (GALLERY_PER_ROW_DEFAULT,
+                                      GALLERY_PER_ROW_MAX)
 from browser.gtk_helpers import add_button, OR_H, OR_V
 from browser.types import ItemsAttrs, AttrValsByVisibility
 from stable.gen_params import (
@@ -319,7 +320,8 @@ class GalleryConfig():
         self._btn_by_1st = add_button(per_row_box, 'by 1st sorter',
                                       toggle_by_1st, checkbox=True)
         self._btn_per_row = Gtk.SpinButton.new_with_range(
-                GALLERY_PER_ROW_DEFAULT, 9, 1)
+                1, GALLERY_PER_ROW_MAX, 1)
+        self._btn_per_row.set_value(GALLERY_PER_ROW_DEFAULT)
         per_row_box.append(self._btn_per_row)
 
         box.append(self.sorter_listing)