summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/calligraphy-toolbar.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-01-22 00:27:41 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-01-22 00:27:41 +0000
commitdfcb135bd1be493716c95ed4e72964fe99c9df2c (patch)
tree3f588291b0a347d4838097999ec26b485ffeeb26 /src/ui/toolbar/calligraphy-toolbar.cpp
parentCleanup unused toolbar code (diff)
downloadinkscape-dfcb135bd1be493716c95ed4e72964fe99c9df2c.tar.gz
inkscape-dfcb135bd1be493716c95ed4e72964fe99c9df2c.zip
Tidy up toolbox code
Diffstat (limited to 'src/ui/toolbar/calligraphy-toolbar.cpp')
-rw-r--r--src/ui/toolbar/calligraphy-toolbar.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ui/toolbar/calligraphy-toolbar.cpp b/src/ui/toolbar/calligraphy-toolbar.cpp
index 7411d10ca..f6900e361 100644
--- a/src/ui/toolbar/calligraphy-toolbar.cpp
+++ b/src/ui/toolbar/calligraphy-toolbar.cpp
@@ -105,11 +105,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Pen Width"), _("Width:"),
_("The width of the calligraphic pen (relative to the visible canvas area)"),
"/tools/calligraphic/width", 15,
- GTK_WIDGET(desktop->canvas),
TRUE, "altx-calligraphy",
1, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0 );
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_width_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_width_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::width_value_changed));
toolbar->_widget_map["width"] = G_OBJECT(toolbar->_width_adj->gobj());
@@ -126,11 +126,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Stroke Thinning"), _("Thinning:"),
_("How much velocity thins the stroke (> 0 makes fast strokes thinner, < 0 makes them broader, 0 makes width independent of velocity)"),
"/tools/calligraphic/thinning", 10,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
-100, 100, 1, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0);
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_thinning_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_thinning_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::velthin_value_changed));
toolbar->_widget_map["thinning"] = G_OBJECT(toolbar->_thinning_adj->gobj());
@@ -146,11 +146,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Pen Angle"), _("Angle:"),
_("The angle of the pen's nib (in degrees; 0 = horizontal; has no effect if fixation = 0)"),
"/tools/calligraphic/angle", 30,
- GTK_WIDGET(desktop->canvas),
TRUE, "calligraphy-angle",
-90.0, 90.0, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0 );
+ ege_adjustment_action_set_focuswidget(toolbar->_angle_action, GTK_WIDGET(desktop->canvas));
toolbar->_angle_adj = Glib::wrap(ege_adjustment_action_get_adjustment(toolbar->_angle_action));
toolbar->_angle_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::angle_value_changed));
toolbar->_widget_map["angle"] = G_OBJECT(toolbar->_angle_adj->gobj());
@@ -166,11 +166,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Fixation"), _("Fixation:"),
_("Angle behavior (0 = nib always perpendicular to stroke direction, 100 = fixed angle)"),
"/tools/calligraphic/flatness", 90,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
0.0, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0);
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_fixation_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_fixation_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::flatness_value_changed));
toolbar->_widget_map["flatness"] = G_OBJECT(toolbar->_fixation_adj->gobj());
@@ -187,11 +187,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Cap rounding"), _("Caps:"),
_("Increase to make caps at the ends of strokes protrude more (0 = no caps, 1 = round caps)"),
"/tools/calligraphic/cap_rounding", 0.0,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
0.0, 5.0, 0.01, 0.1,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 0.01, 2 );
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_cap_rounding_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_cap_rounding_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::cap_rounding_value_changed));
toolbar->_widget_map["cap_rounding"] = G_OBJECT(toolbar->_cap_rounding_adj->gobj());
@@ -207,12 +207,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Stroke Tremor"), _("Tremor:"),
_("Increase to make strokes rugged and trembling"),
"/tools/calligraphic/tremor", 0.0,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
0.0, 100, 1, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0);
-
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_tremor_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_tremor_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::tremor_value_changed));
toolbar->_widget_map["tremor"] = G_OBJECT(toolbar->_tremor_adj->gobj());
@@ -229,11 +228,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Pen Wiggle"), _("Wiggle:"),
_("Increase to make the pen waver and wiggle"),
"/tools/calligraphic/wiggle", 0.0,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
0.0, 100, 1, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0);
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_wiggle_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_wiggle_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::wiggle_value_changed));
toolbar->_widget_map["wiggle"] = G_OBJECT(toolbar->_wiggle_adj->gobj());
@@ -250,11 +249,11 @@ CalligraphyToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
_("Pen Mass"), _("Mass:"),
_("Increase to make the pen drag behind, as if slowed by inertia"),
"/tools/calligraphic/mass", 2.0,
- GTK_WIDGET(desktop->canvas),
FALSE, nullptr,
0.0, 100, 1, 10.0,
labels, values, G_N_ELEMENTS(labels),
nullptr /*unit tracker*/, 1, 0);
+ ege_adjustment_action_set_focuswidget(eact, GTK_WIDGET(desktop->canvas));
toolbar->_mass_adj = Glib::wrap(ege_adjustment_action_get_adjustment(eact));
toolbar->_mass_adj->signal_value_changed().connect(sigc::mem_fun(*toolbar, &CalligraphyToolbar::mass_value_changed));
toolbar->_widget_map["mass"] = G_OBJECT(toolbar->_mass_adj->gobj());