From: scislac Date: Mon, 4 Sep 2006 15:51:05 +0000 (+0000) Subject: added ui for mental's calligraphy tool cap rounding X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a959ff07ba418161d16a6417b08e099c9183e1b;p=inkscape.git added ui for mental's calligraphy tool cap rounding --- diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index ed9259aef..13b731c79 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -1984,6 +1984,13 @@ sp_ddc_tremor_value_changed(GtkAdjustment *adj, GtkWidget *tbl) spinbutton_defocus(GTK_OBJECT(tbl)); } +static void +sp_ddc_cap_rounding_value_changed(GtkAdjustment *adj, GtkWidget *tbl) +{ + prefs_set_double_attribute("tools.calligraphic", "cap_rounding", adj->value); + spinbutton_defocus(GTK_OBJECT(tbl)); +} + static void sp_ddc_pressure_state_changed(GtkWidget *button, gpointer data) { @@ -2011,7 +2018,8 @@ static void sp_ddc_defaults(GtkWidget *, GtkWidget *tbl) {"width", 15}, {"thinning", 0.1}, {"tremor", 0.0}, - {"flatness", 0.9} + {"flatness", 0.9}, + {"cap_rounding", 0.0} }; for (unsigned i = 0; i < G_N_ELEMENTS(key_values); ++i) { @@ -2091,6 +2099,7 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop) sp_ddc_tremor_value_changed, 0.01, 2); gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING); } + /* Mass */ { GtkWidget *hb = sp_tb_spinbutton(_("Mass:"), _("How much inertia affects the movement of the pen"), @@ -2112,6 +2121,17 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop) gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING); } + /* Cap Rounding */ + { + // TRANSLATORS: "cap" means "end" (both start and finish) here + GtkWidget *hb = sp_tb_spinbutton(_("Round:"), _("How much the ends of a stroke are rounded"), + "tools.calligraphic", "cap_rounding", 1, + NULL, tbl, FALSE, NULL, + 0.0, 1.0, 0.01, 0.1, + sp_ddc_cap_rounding_value_changed, 0.01, 2); + gtk_box_pack_start(GTK_BOX(tbl), hb, FALSE, FALSE, AUX_SPACING); + } + // interval gtk_box_pack_start(GTK_BOX(tbl), gtk_hbox_new(FALSE, 0), FALSE, FALSE, AUX_BETWEEN_BUTTON_GROUPS);