diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-19 10:50:48 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-19 10:50:48 +0000 |
| commit | a3d1d9d574192d268ed4d120ff30b7f8ebbc01fa (patch) | |
| tree | a239da7d25f738496be1919704f51a7cd6dafe32 /src/widgets | |
| parent | Working with rotate preview (diff) | |
| parent | update author list in about dialog from AUTHORS file (diff) | |
| download | inkscape-a3d1d9d574192d268ed4d120ff30b7f8ebbc01fa.tar.gz inkscape-a3d1d9d574192d268ed4d120ff30b7f8ebbc01fa.zip | |
Update to trunk
(bzr r15142.1.16)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/mesh-toolbar.cpp | 19 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/widgets/mesh-toolbar.cpp b/src/widgets/mesh-toolbar.cpp index 0e689fee0..898104ad3 100644 --- a/src/widgets/mesh-toolbar.cpp +++ b/src/widgets/mesh-toolbar.cpp @@ -348,6 +348,14 @@ static void ms_pick_colors(void) } } +static void ms_fit_mesh(void) +{ + MeshTool *mt = get_mesh_tool(); + if (mt) { + sp_mesh_context_fit_mesh_in_bbox( mt ); + } +} + static void mesh_toolbox_watch_ec(SPDesktop* dt, Inkscape::UI::Tools::ToolBase* ec, GObject* holder); /** @@ -557,6 +565,17 @@ void sp_mesh_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, GObj } + { + InkAction* act = ink_action_new( "MeshFitInBoundingBoxAction", + _("Scale mesh to bounding box:"), + _("Scale mesh to fit inside bounding box."), + INKSCAPE_ICON("mesh-gradient-fit"), + secondarySize ); + g_object_set( act, "short_label", _("Fit mesh"), NULL ); + g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(ms_fit_mesh), 0 ); + gtk_action_group_add_action( mainActions, GTK_ACTION(act) ); + } + } static void mesh_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder) diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index c03ca85e6..d3715cf4e 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -572,6 +572,7 @@ static gchar const * ui_descr = " <toolitem action='MeshToggleSidesAction' />" " <toolitem action='MeshMakeEllipticalAction' />" " <toolitem action='MeshPickColorsAction' />" + " <toolitem action='MeshFitInBoundingBoxAction' />" " <separator />" " <toolitem action='MeshWarningAction' />" " <toolitem action='MeshSmoothAction' />" |
