diff options
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index b630b3626..c3b124fd8 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2178,6 +2178,11 @@ static void sp_ddc_pressure_state_changed( GtkToggleAction *act, gpointer data ) prefs_set_int_attribute( "tools.calligraphic", "usepressure", gtk_toggle_action_get_active( act ) ? 1 : 0); } +static void sp_ddc_trace_background_changed( GtkToggleAction *act, gpointer data ) +{ + prefs_set_int_attribute( "tools.calligraphic", "tracebackground", gtk_toggle_action_get_active( act ) ? 1 : 0); +} + static void sp_ddc_tilt_state_changed( GtkToggleAction *act, GtkAction *calligraphy_angle ) { prefs_set_int_attribute( "tools.calligraphic", "usetilt", gtk_toggle_action_get_active( act ) ? 1 : 0 ); @@ -2233,6 +2238,7 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop) " <toolitem action='WiggleAction' />" " <toolitem action='MassAction' />" " <separator />" + " <toolitem action='TraceAction' />" " <toolitem action='PressureAction' />" " <toolitem action='TiltAction' />" " <toolitem action='ResetAction' />" @@ -2369,6 +2375,18 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop) } + /* Trace Background button */ + { + InkToggleAction* act = ink_toggle_action_new( "TraceAction", + _("Trace Background"), + _("Trace the lightness of the background by the width of the pen (white - minimum width, black - maximum width)"), + "trace_background", + Inkscape::ICON_SIZE_DECORATION ); + gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); + g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(sp_ddc_trace_background_changed), NULL); + gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(act), prefs_get_int_attribute( "tools.calligraphic", "tracebackground", 0 ) ); + } + /* Use Pressure button */ { InkToggleAction* act = ink_toggle_action_new( "PressureAction", |
