diff --git a/ChangeLog b/ChangeLog index 0bad053737..6fa4dde197 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-12-31 Bill Skaggs + + * app/paint/gimpbrushcore.c + * app/paint/gimppaintoptions.c + * app/paint/gimppaintoptions.h + * app/tools/gimppaintoptions-gui.c: reverted last change, and + applied full patch from Dave Ahlswede in bug #149576. + 2004-12-31 Bill Skaggs * tools/pdbgen/pdb/gradient.pdb: added gradient-is-editable diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c index e80bfc689b..bfb2631adb 100644 --- a/app/paint/gimpbrushcore.c +++ b/app/paint/gimpbrushcore.c @@ -36,7 +36,6 @@ #include "gimpbrushcore.h" #include "gimpbrushcore-kernels.h" #include "gimppaintoptions.h" -#include "gimpairbrushoptions.h" #include "gimp-intl.h" @@ -663,11 +662,10 @@ gimp_brush_core_get_paint_area (GimpPaintCore *paint_core, { GimpPressureOptions *pressure_options = paint_options->pressure_options; - if (pressure_options->size) - if (GIMP_IS_AIRBRUSH_OPTIONS (paint_options)) - core->scale = 1.0 - 0.9 * paint_core->cur_coords.pressure; - else - core->scale = paint_core->cur_coords.pressure; + if (pressure_options->inv_size) + core->scale = 1.0 - 0.9 * paint_core->cur_coords.pressure; + else if (pressure_options->size) + core->scale = paint_core->cur_coords.pressure; else core->scale = 1.0; } diff --git a/app/paint/gimppaintoptions.c b/app/paint/gimppaintoptions.c index 710198addb..1b5bcda6b0 100644 --- a/app/paint/gimppaintoptions.c +++ b/app/paint/gimppaintoptions.c @@ -43,6 +43,7 @@ #define DEFAULT_PRESSURE_RATE FALSE #define DEFAULT_PRESSURE_SIZE FALSE #define DEFAULT_PRESSURE_COLOR FALSE +#define DEFAULT_PRESSURE_INVSIZE FALSE #define DEFAULT_USE_FADE FALSE #define DEFAULT_FADE_LENGTH 100.0 @@ -66,6 +67,7 @@ enum PROP_PRESSURE_RATE, PROP_PRESSURE_SIZE, PROP_PRESSURE_COLOR, + PROP_PRESSURE_INVSIZE, PROP_USE_FADE, PROP_FADE_LENGTH, PROP_FADE_UNIT, @@ -173,6 +175,10 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass) "pressure-color", NULL, DEFAULT_PRESSURE_COLOR, 0); + GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_PRESSURE_INVSIZE, + "pressure-invsize", NULL, + DEFAULT_PRESSURE_INVSIZE, + 0); GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_FADE, "use-fade", NULL, @@ -276,6 +282,9 @@ gimp_paint_options_set_property (GObject *object, case PROP_PRESSURE_COLOR: pressure_options->color = g_value_get_boolean (value); break; + case PROP_PRESSURE_INVSIZE: + pressure_options->inv_size = g_value_get_boolean (value); + break; case PROP_USE_FADE: fade_options->use_fade = g_value_get_boolean (value); @@ -352,6 +361,9 @@ gimp_paint_options_get_property (GObject *object, case PROP_PRESSURE_COLOR: g_value_set_boolean (value, pressure_options->color); break; + case PROP_PRESSURE_INVSIZE: + g_value_set_boolean (value, pressure_options->inv_size); + break; case PROP_USE_FADE: g_value_set_boolean (value, fade_options->use_fade); diff --git a/app/paint/gimppaintoptions.h b/app/paint/gimppaintoptions.h index 4fe3c1db99..dc5719af69 100644 --- a/app/paint/gimppaintoptions.h +++ b/app/paint/gimppaintoptions.h @@ -41,6 +41,7 @@ struct _GimpPressureOptions gboolean rate; gboolean size; gboolean color; + gboolean inv_size; }; struct _GimpFadeOptions diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c index 5528084c65..3130698f6c 100644 --- a/app/tools/gimppaintoptions-gui.c +++ b/app/tools/gimppaintoptions-gui.c @@ -265,11 +265,13 @@ pressure_options_gui (GimpPressureOptions *pressure, } /* the size toggle */ - if (g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) || - tool_type == GIMP_TYPE_CLONE_TOOL || - tool_type == GIMP_TYPE_CONVOLVE_TOOL || - tool_type == GIMP_TYPE_DODGE_BURN_TOOL || - tool_type == GIMP_TYPE_ERASER_TOOL) + if ((g_type_is_a (tool_type, GIMP_TYPE_PAINTBRUSH_TOOL) || + tool_type == GIMP_TYPE_CLONE_TOOL || + tool_type == GIMP_TYPE_CONVOLVE_TOOL || + tool_type == GIMP_TYPE_DODGE_BURN_TOOL || + tool_type == GIMP_TYPE_ERASER_TOOL) + && + ! g_type_is_a (tool_type, GIMP_TYPE_AIRBRUSH_TOOL)) { button = gimp_prop_check_button_new (config, "pressure-size", _("Size")); @@ -286,6 +288,15 @@ pressure_options_gui (GimpPressureOptions *pressure, gtk_widget_show (button); } + /* the inverse size toggle */ + if (g_type_is_a (tool_type, GIMP_TYPE_AIRBRUSH_TOOL)) + { + button = gimp_prop_check_button_new (config, "pressure-invsize", + _("Size")); + gtk_container_add (GTK_CONTAINER (wbox), button); + gtk_widget_show (button); + } + return frame; }