Philipp Hörist pushed to branch master at gajim / gajim


Commits:
b8e7a54b by Philipp Hörist at 2026-02-13T21:05:28+01:00
fix: Settings: Use correct fractional digits for spin settings

- - - - -


3 changed files:

- gajim/gtk/preference/account.py
- gajim/gtk/preference/app.py
- gajim/gtk/settings.py


Changes:

=====================================
gajim/gtk/preference/account.py
=====================================
@@ -38,6 +38,7 @@
 from gajim.gtk.settings import GajimPreferencePage
 from gajim.gtk.settings import GajimPreferencesGroup
 from gajim.gtk.settings import SignalManager
+from gajim.gtk.settings import SpinRange
 from gajim.gtk.structs import ExportHistoryParam
 from gajim.gtk.util.misc import get_ui_string
 from gajim.gtk.util.window import open_window
@@ -759,7 +760,7 @@ def __init__(self, account: str) -> None:
                 SettingType.ACCOUNT_CONFIG,
                 "custom_port",
                 bind="account::use_custom_host",
-                props={"range_": (0, 65535, 1)},
+                props={"range_": SpinRange(0, 65535, 1, 0)},
             ),
             Setting(
                 SettingKind.DROPDOWN,


=====================================
gajim/gtk/preference/app.py
=====================================
@@ -384,7 +384,7 @@ def __init__(self) -> None:
                 SettingType.CONFIG,
                 "preview_size",
                 desc=_("Size of preview images in pixels"),
-                props={"range_": (100, 1000, 1)},
+                props={"range_": SpinRange(100, 1000, 50, 0)},
             ),
             Setting(
                 SettingKind.SWITCH,
@@ -577,7 +577,7 @@ def __init__(self) -> None:
                 SettingType.CONFIG,
                 "autoawaytime",
                 desc=_("Minutes until your status gets changed"),
-                props={"range_": (1, 720, 1)},
+                props={"range_": SpinRange(1, 720, 1, 0)},
                 bind="autoaway",
             ),
             Setting(
@@ -610,7 +610,7 @@ def __init__(self) -> None:
                 SettingType.CONFIG,
                 "autoxatime",
                 desc=_("Minutes until your status gets changed"),
-                props={"range_": (1, 720, 1)},
+                props={"range_": SpinRange(1, 720, 1, 0)},
                 bind="autoxa",
             ),
             Setting(


=====================================
gajim/gtk/settings.py
=====================================
@@ -541,7 +541,7 @@ class SpinRange:
     lower: float
     upper: float
     step: float
-    digits: int = 3
+    digits: int = 0
 
 
 class SpinSetting(GenericSetting):



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b8e7a54be992cc85d599b64eda408bf943d057be

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/b8e7a54be992cc85d599b64eda408bf943d057be
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to