mirror of https://github.com/GNOME/gimp.git
app/widgets/gimppropwidgets.c some fiddling to get the step and page sizes
2008-05-26 Sven Neumann <sven@gimp.org> * app/widgets/gimppropwidgets.c * app/widgets/gimpscalebutton.[ch]: some fiddling to get the step and page sizes right. svn path=/trunk/; revision=25810
This commit is contained in:
parent
c5f309fad1
commit
b059874979
|
@ -1,3 +1,9 @@
|
|||
2008-05-26 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimppropwidgets.c
|
||||
* app/widgets/gimpscalebutton.[ch]: some fiddling to get the step
|
||||
and page sizes right.
|
||||
|
||||
2008-05-26 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimppropwidgets.[ch]: support for GimpScaleButton.
|
||||
|
|
|
@ -365,10 +365,9 @@ gimp_prop_scale_button_new (GObject *config,
|
|||
{
|
||||
GParamSpec *param_spec;
|
||||
GtkWidget *button;
|
||||
GtkObject *adj;
|
||||
gdouble value;
|
||||
gdouble lower;
|
||||
gdouble upper;
|
||||
gdouble min;
|
||||
gdouble max;
|
||||
|
||||
param_spec = check_param_spec_w (config, property_name,
|
||||
G_TYPE_PARAM_DOUBLE, G_STRFUNC);
|
||||
|
@ -380,14 +379,12 @@ gimp_prop_scale_button_new (GObject *config,
|
|||
param_spec->name, &value,
|
||||
NULL);
|
||||
|
||||
lower = G_PARAM_SPEC_DOUBLE (param_spec)->minimum;
|
||||
upper = G_PARAM_SPEC_DOUBLE (param_spec)->maximum;
|
||||
min = G_PARAM_SPEC_DOUBLE (param_spec)->minimum;
|
||||
max = G_PARAM_SPEC_DOUBLE (param_spec)->maximum;
|
||||
|
||||
button = gimp_scale_button_new ();
|
||||
button = gimp_scale_button_new (min, max, (max - min) / 10.0);
|
||||
|
||||
adj = gtk_adjustment_new (value, lower, upper, (upper - lower) / 10.0, 0, 0);
|
||||
gtk_scale_button_set_adjustment (GTK_SCALE_BUTTON (button),
|
||||
GTK_ADJUSTMENT (adj));
|
||||
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), value);
|
||||
|
||||
set_param_spec (G_OBJECT (button), button, param_spec);
|
||||
|
||||
|
|
Binary file not shown.
|
@ -46,7 +46,9 @@ struct _GimpScaleButtonClass
|
|||
|
||||
GType gimp_scale_button_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gimp_scale_button_new (void);
|
||||
GtkWidget * gimp_scale_button_new (gdouble min,
|
||||
gdouble max,
|
||||
gdouble step);
|
||||
|
||||
|
||||
#endif /* __GIMP_SCALE_BUTTON_H__ */
|
||||
|
|
Loading…
Reference in New Issue