summaryrefslogtreecommitdiffstats
path: root/src/widgets/select-toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/select-toolbar.cpp')
-rw-r--r--src/widgets/select-toolbar.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 9851b0606..2ac7447dd 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -13,7 +13,7 @@
*/
#ifdef HAVE_CONFIG_H
-# include "config.h"
+#include <config.h>
#endif
#include <2geom/rect.h>
@@ -29,22 +29,19 @@
#include "widgets/ege-adjustment-action.h"
#include "helper/action-context.h"
#include "helper/action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-toggle-action.h"
#include "inkscape.h"
#include "message-stack.h"
-#include "preferences.h"
#include "selection-chemistry.h"
-#include "selection.h"
#include "sp-item-transform.h"
#include "sp-namedview.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/widget/unit-tracker.h"
-#include "util/units.h"
#include "verbs.h"
#include "widgets/icon.h"
#include "widgets/sp-widget.h"
-#include "widgets/spw-utilities.h"
#include "widgets/widget-sizes.h"
using Inkscape::UI::Widget::UnitTracker;
@@ -257,7 +254,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, GObject *tbl)
scaler = get_scale_transform_for_uniform_stroke (*bbox_geom, 0, 0, false, false, x0, y0, x1, y1);
}
- sp_selection_apply_affine(selection, scaler);
+ selection->applyAffine(scaler);
DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT,
_("Transform by toolbar"));
@@ -415,12 +412,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
g_object_set_data(G_OBJECT(spw), "dtw", desktop->getCanvas());
// The vb frame holds all other widgets and is used to set sensitivity depending on selection state.
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- GtkWidget *vb = gtk_hbox_new(FALSE, 0);
-#endif
gtk_widget_show(vb);
gtk_container_add(GTK_CONTAINER(spw), vb);
@@ -557,14 +550,14 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
} else {
g_warning("Unexpected holder type");
}
-
// "Transform with object" buttons
{
+
InkToggleAction* itact = ink_toggle_action_new( "transform_stroke",
_("Scale stroke width"),
_("When scaling objects, scale the stroke width by the same proportion"),
- INKSCAPE_ICON("transform-affect-stroke"),
- Inkscape::ICON_SIZE_DECORATION );
+ "transform-affect-stroke",
+ secondarySize );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/stroke", true) );
g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_stroke), desktop) ;
gtk_action_group_add_action( mainActions, GTK_ACTION(itact) );
@@ -574,8 +567,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
InkToggleAction* itact = ink_toggle_action_new( "transform_corners",
_("Scale rounded corners"),
_("When scaling rectangles, scale the radii of rounded corners"),
- INKSCAPE_ICON("transform-affect-rounded-corners"),
- Inkscape::ICON_SIZE_DECORATION );
+ "transform-affect-rounded-corners",
+ secondarySize );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/rectcorners", true) );
g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_corners), desktop) ;
gtk_action_group_add_action( mainActions, GTK_ACTION(itact) );
@@ -585,8 +578,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
InkToggleAction* itact = ink_toggle_action_new( "transform_gradient",
_("Move gradients"),
_("Move gradients (in fill or stroke) along with the objects"),
- INKSCAPE_ICON("transform-affect-gradient"),
- Inkscape::ICON_SIZE_DECORATION );
+ "transform-affect-gradient",
+ secondarySize );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/gradient", true) );
g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_gradient), desktop) ;
gtk_action_group_add_action( mainActions, GTK_ACTION(itact) );
@@ -596,8 +589,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
InkToggleAction* itact = ink_toggle_action_new( "transform_pattern",
_("Move patterns"),
_("Move patterns (in fill or stroke) along with the objects"),
- INKSCAPE_ICON("transform-affect-pattern"),
- Inkscape::ICON_SIZE_DECORATION );
+ "transform-affect-pattern",
+ secondarySize );
gtk_toggle_action_set_active( GTK_TOGGLE_ACTION(itact), prefs->getBool("/options/transform/pattern", true) );
g_signal_connect_after( G_OBJECT(itact), "toggled", G_CALLBACK(toggle_pattern), desktop) ;
gtk_action_group_add_action( mainActions, GTK_ACTION(itact) );