1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

libgimpwidgets: enable expression parser for GimpSizeEntry

This commit allows the "reference value" spinbuttons in GimpSizeEntry
to accept and evaluate mathematical expressions, just like the main
value fields. The GimpEevl parser is now attached to both value and
reference value spinbuttons.
This commit is contained in:
Gabriele Barbero
2025-08-04 17:29:08 +02:00
committed by Alx Sa
parent f989b4f50c
commit e9090f9b55

View File

@@ -377,6 +377,9 @@ gimp_size_entry_new (gint number_of_fields,
G_CALLBACK (gimp_size_entry_refval_callback),
gsef);
gimp_size_entry_attach_eevl (GTK_SPIN_BUTTON (gsef->refval_spinbutton),
gsef);
gtk_widget_show (gsef->refval_spinbutton);
}
@@ -486,6 +489,9 @@ gimp_size_entry_add_field (GimpSizeEntry *gse,
g_signal_connect (gsef->refval_adjustment, "value-changed",
G_CALLBACK (gimp_size_entry_refval_callback),
gsef);
gimp_size_entry_attach_eevl (GTK_SPIN_BUTTON (gsef->refval_spinbutton),
gsef);
}
digits = ((gse->unit == gimp_unit_pixel ()) ? gsef->refval_digits :