[gimp] app: apply constraining to opacity scales as well.



commit f7c94a8a8cd81ae031e8967c62c042f06be44c09
Author: Jehan <jehan girinstud io>
Date:   Mon Jan 28 17:43:43 2019 +0100

    app: apply constraining to opacity scales as well.
    
    In paint options as well in layer list.
    I also updated an opacity spin scale in GimpBrushSelect core widget, but
    this one doesn't look like it is used anywhere anymore.

 app/tools/gimppaintoptions-gui.c | 1 +
 app/widgets/gimpbrushselect.c    | 1 +
 app/widgets/gimplayertreeview.c  | 1 +
 3 files changed, 3 insertions(+)
---
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index 23aef019e6..531d2b53e6 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -130,6 +130,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
   /*  the opacity scale  */
   scale = gimp_prop_spin_scale_new (config, "opacity", NULL,
                                     0.01, 0.1, 0);
+  gimp_spin_scale_set_constrain_drag (GIMP_SPIN_SCALE (scale), TRUE);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
diff --git a/app/widgets/gimpbrushselect.c b/app/widgets/gimpbrushselect.c
index b87cd323e1..67d2101915 100644
--- a/app/widgets/gimpbrushselect.c
+++ b/app/widgets/gimpbrushselect.c
@@ -173,6 +173,7 @@ gimp_brush_select_constructed (GObject *object)
 
   scale = gimp_spin_scale_new (select->opacity_data,
                                _("Opacity"), 1);
+  gimp_spin_scale_set_constrain_drag (GIMP_SPIN_SCALE (scale), TRUE);
   gtk_box_pack_end (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
 
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index a392ccd428..f779ccf0a5 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -284,6 +284,7 @@ gimp_layer_tree_view_init (GimpLayerTreeView *view)
   view->priv->opacity_adjustment = gtk_adjustment_new (100.0, 0.0, 100.0,
                                                        1.0, 10.0, 0.0);
   scale = gimp_spin_scale_new (view->priv->opacity_adjustment, _("Opacity"), 1);
+  gimp_spin_scale_set_constrain_drag (GIMP_SPIN_SCALE (scale), TRUE);
   gimp_help_set_help_data (scale, NULL,
                            GIMP_HELP_LAYER_DIALOG_OPACITY_SCALE);
   gimp_item_tree_view_add_options (GIMP_ITEM_TREE_VIEW (view),


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