Commit Graph

6 Commits

Author SHA1 Message Date
Alx Sa 74e7e16ec3 libgimpwidgets: Convert widgets to final/derived type
This patch converts libgimpwidgets with
no signals to be final or derived types.
The remaining widgets will be converted
in a subsequent patch.
2024-07-29 01:51:38 +00:00
Ell e531023031 libgimpwidgets: handle Enter/Esc keys in GimpSpinButton
In GimpSpinButton, don't propagate Enter key-press events if
updating the spin-button's value in response changes the entered
text.  This prevents confirming dialogs when hitting Enter after
entering a math expression in size entries, updating their value
instead.

Likewise, don't propagate Escape key-press events if a new value
was entered, and restore the original value instead.
2020-07-14 13:00:55 +03:00
Ell ac8bf47fa6 libgimpwidgets: control GimpSpinButton scroll increments using modifiers
In GimpSpinButton, adjust the scroll step in response to modifiers:
normal scrolling uses the step increment, Ctrl uses the page
increment, and Shift scales the step increment down by the ratio
between the page and step increments (up to the minimal precision
of the spin button).

This applies to all spin buttons used in GIMP, including spin
scales.
2020-01-08 21:00:57 +02:00
Ell 8b3c7ae193 Issue #2557 - Gimp Can't Rotate By More Than 180 Degree
When the "wrap" property of a GimpSpinButton is TRUE, wrap-around
out-of-range values entered through the spin-button's text entry,
instead of clamping them.  Since we're using GimpSpinButton
everywhere since last commit, this applies to all our angle-entry
spin buttons (including spin scales).
2019-03-09 07:28:56 -05:00
Ell 19eb9fb1bf libgimpwidgets: fix gimp_spin_button_new_with_range() 2019-03-03 04:22:24 -05:00
Ell 7ab9ee2686 libgimpwidgets: add GimpSpinButton
GimpSpinButton is a drop-in replacement for (and a subclass of)
GtkSpinButton.  Unlike GtkSpinButton, it avoids updating the
adjustment value when losing focus, unless the entry text has
changed.  This prevents accidental loss of precision, when the
adjustment value can't be accurately displayed in the entry.
2018-11-10 06:48:56 -05:00