Commit d416f0e8 authored by Alexandru Băluț's avatar Alexandru Băluț

widgets: Remove workaround for huge spinners

The Spinner widgets are not huge anymore if the upper limit is very
large, on least Gtk 3.24.

Fixes #2143
parent 4d0ee062
Pipeline #5147 failed with stage
in 8 minutes and 19 seconds
......@@ -234,16 +234,12 @@ class NumericWidget(Gtk.Box, DynamicWidget):
with_slider = (lower is not None and lower > -reasonable_limit and
upper is not None and upper < reasonable_limit)
self.adjustment = Gtk.Adjustment()
# Limit the limits, otherwise the widget appears huge.
# Workaround
# If these hardcoded limits are a problem, the fix should be passing
# the proper limits using the upper and lower parameters.
if upper is None:
upper = GLib.MAXINT16
upper = GLib.MAXINT32
if lower is None:
lower = GLib.MININT16
self.adjustment.props.lower = max(GLib.MININT16, lower)
self.adjustment.props.upper = min(upper, GLib.MAXINT16)
lower = GLib.MININT32
self.adjustment.props.lower = lower
self.adjustment.props.upper = upper
if with_slider:
self.slider =
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment