Commit 658d9f3a authored by Ell's avatar Ell

Issue #2470 - Spacing between grid lines does not stay at 1px ...

... as I would like it to.

Use GimpSpinButton, added in the previous commit, in GimpSizeEntry,
instead of GtkSpinButton.  This avoids updating the spin-buttons'
adjustment values when they lose focus, truncating the value if it
can't be accurately displayed using the corresponding spin-button's
digit count.  Since size-entries can have multiple spin-buttons
using different units, this prevents the value from changing when
entring a value using one unit, and then shifting the focus to, but
not changing, another unit.
parent 7ab9ee26
......@@ -344,8 +344,8 @@ gimp_size_entry_new (gint number_of_fields,
gsef->min_value,
gsef->max_value,
1.0, 10.0, 0.0);
gsef->value_spinbutton = gtk_spin_button_new (gsef->value_adjustment,
1.0, digits);
gsef->value_spinbutton = gimp_spin_button_new (gsef->value_adjustment,
1.0, digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gsef->value_spinbutton),
TRUE);
......@@ -376,9 +376,9 @@ gimp_size_entry_new (gint number_of_fields,
gsef->min_refval,
gsef->max_refval,
1.0, 10.0, 0.0);
gsef->refval_spinbutton = gtk_spin_button_new (gsef->refval_adjustment,
1.0,
gsef->refval_digits);
gsef->refval_spinbutton = gimp_spin_button_new (gsef->refval_adjustment,
1.0,
gsef->refval_digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gsef->refval_spinbutton),
TRUE);
......
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