Commit 70574877 authored by Michael Natterer's avatar Michael Natterer 😴

app: use GimpSpinScale for the new smoothing options

This drops the log scale, but the new widget will get a better
solution for this anyway. Also did some cleanup.
parent c29aefcc
......@@ -57,11 +57,10 @@ static void gimp_paint_options_gui_reset_size (GtkWidget *button,
static GtkWidget * dynamics_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * jitter_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * smoothing_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * jitter_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
static GtkWidget * smoothing_options_gui (GimpPaintOptions *paint_options,
GType tool_type);
/* public functions */
......@@ -318,49 +317,47 @@ jitter_options_gui (GimpPaintOptions *paint_options,
return frame;
}
static void
gimp_paint_options_gui_reset_size (GtkWidget *button,
GimpPaintOptions *paint_options)
{
GimpBrush *brush = gimp_context_get_brush (GIMP_CONTEXT (paint_options));
if (brush)
{
g_object_set (paint_options,
"brush-size", (gdouble) MAX (brush->mask->width,
brush->mask->height),
NULL);
}
}
static GtkWidget *
smoothing_options_gui (GimpPaintOptions *paint_options,
GType tool_type)
{
GObject *config = G_OBJECT (paint_options);
GtkWidget *frame;
GtkWidget *table;
GtkObject *factor;
GtkWidget *vbox;
GtkWidget *scale;
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
vbox = gtk_vbox_new (FALSE, 2);
frame = gimp_prop_expanding_frame_new (config, "use-smoothing",
_("Smooth stroke"),
table, NULL);
vbox, NULL);
gimp_prop_scale_entry_new (config, "smoothing-quality",
GTK_TABLE (table), 0, 0,
_("Quality:"),
1, 10, 1,
FALSE, 0, 100);
scale = gimp_prop_spin_scale_new (config, "smoothing-quality",
_("Quality"),
1, 10, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
factor = gimp_prop_scale_entry_new (config, "smoothing-factor",
GTK_TABLE (table), 0, 1,
_("Factor:"),
1, 10, 1,
FALSE, 0, 100);
gimp_scale_entry_set_logarithmic (factor, TRUE);
scale = gimp_prop_spin_scale_new (config, "smoothing-factor",
_("Factor"),
1, 10, 1);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
return frame;
}
static void
gimp_paint_options_gui_reset_size (GtkWidget *button,
GimpPaintOptions *paint_options)
{
GimpBrush *brush = gimp_context_get_brush (GIMP_CONTEXT (paint_options));
if (brush)
{
g_object_set (paint_options,
"brush-size", (gdouble) MAX (brush->mask->width,
brush->mask->height),
NULL);
}
}
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