[gimp/gimp-2-10] Issue #2470 - Spacing between grid lines does not stay at 1px ...



commit 3a584ca15102ddca174931cb1b4cdb80250c4950
Author: Ell <ell_se yahoo com>
Date:   Sat Nov 10 06:36:04 2018 -0500

    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.

 libgimpwidgets/gimpsizeentry.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libgimpwidgets/gimpsizeentry.c b/libgimpwidgets/gimpsizeentry.c
index bb6a543d14..bad14683da 100644
--- a/libgimpwidgets/gimpsizeentry.c
+++ b/libgimpwidgets/gimpsizeentry.c
@@ -325,8 +325,8 @@ gimp_size_entry_new (gint                       number_of_fields,
         gtk_adjustment_new (gsef->value,
                             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);
 
@@ -358,9 +358,9 @@ gimp_size_entry_new (gint                       number_of_fields,
             gtk_adjustment_new (gsef->refval,
                                 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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]