[gimp/goat-invasion: 360/412] app: anal



commit d9bc8d01b14b0669cfe59403ac9fe9052c22ff3b
Author: Michael Natterer <mitch gimp org>
Date:   Sat Mar 31 19:41:15 2012 +0200

    app: anal

 app/widgets/gimpspinscale.c |    7 +++++--
 app/widgets/gimpspinscale.h |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index 245d4de..acc5ac6 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -138,10 +138,12 @@ static void
 gimp_spin_scale_init (GimpSpinScale *scale)
 {
   GimpSpinScalePrivate *private = GET_PRIVATE (scale);
-  private->gamma = 1.0;
+
   gtk_entry_set_alignment (GTK_ENTRY (scale), 1.0);
   gtk_entry_set_has_frame (GTK_ENTRY (scale), FALSE);
   gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale), TRUE);
+
+  private->gamma = 1.0;
 }
 
 static void
@@ -600,7 +602,8 @@ gimp_spin_scale_value_changed (GtkSpinButton *spin_button)
 
 
   gtk_entry_set_progress_fraction (GTK_ENTRY (spin_button),
-                  pow((value - lower) / (upper - lower), 1.0/private->gamma));
+                                   pow ((value - lower) / (upper - lower),
+                                        1.0 / private->gamma));
 }
 
 
diff --git a/app/widgets/gimpspinscale.h b/app/widgets/gimpspinscale.h
index 2ab3090..f3079d4 100644
--- a/app/widgets/gimpspinscale.h
+++ b/app/widgets/gimpspinscale.h
@@ -60,7 +60,7 @@ gboolean    gimp_spin_scale_get_scale_limits   (GimpSpinScale *scale,
 
 void        gimp_spin_scale_set_gamma          (GimpSpinScale *scale,
                                                 gdouble        gamma);
-
 gdouble     gimp_spin_scale_get_gamma          (GimpSpinScale *scale);
 
+
 #endif  /*  __GIMP_SPIN_SCALE_H__  */



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