From a0b5dd0534272954ef5d1956b1af9ecd6cf900f5 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 23 Apr 2026 23:11:16 +0200 Subject: [PATCH] Don't lower-end per-rows config choices to GALLERY_PER_ROW_DEFAULT. --- browser/config_constants.py | 1 + browser/gallery_config.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/browser/config_constants.py b/browser/config_constants.py index e635065..2ca9a54 100644 --- a/browser/config_constants.py +++ b/browser/config_constants.py @@ -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' diff --git a/browser/gallery_config.py b/browser/gallery_config.py index cbd77ab..50bb0e8 100644 --- a/browser/gallery_config.py +++ b/browser/gallery_config.py @@ -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) -- 2.30.2