From 84766315ff4f59563bc8e6e100b6fc1d435df6f7 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Mon, 18 Apr 2011 23:14:35 -0700 Subject: Restore modularity to adjustment action. (bzr r10184) --- src/widgets/select-toolbar.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 89253983b..e08b4ac61 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -23,6 +23,7 @@ #include "widgets/spw-utilities.h" #include "widgets/widget-sizes.h" #include "widgets/spinbutton-events.h" +#include "ui/widget/spinbutton.h" #include "widgets/icon.h" #include "widgets/sp-widget.h" @@ -255,6 +256,16 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) g_object_set_data(G_OBJECT(spw), "update", GINT_TO_POINTER(FALSE)); } +static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRate, guint digits ) +{ + Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(*Glib::wrap(adjustment, true), climbRate, digits); + inkSpinner = Gtk::manage( inkSpinner ); + GtkWidget *widget = GTK_WIDGET( inkSpinner->gobj() ); + return widget; +} + +// TODO create_adjustment_action appears to be a rogue tile copy from toolbox.cpp. Resolve it to be unified: + static EgeAdjustmentAction * create_adjustment_action( gchar const *name, gchar const *label, gchar const *shortLabel, @@ -266,6 +277,12 @@ static EgeAdjustmentAction * create_adjustment_action( gchar const *name, gchar const *tooltip, gboolean altx ) { + static bool init = false; + if ( !init ) { + init = true; + ege_adjustment_action_set_compact_tool_factory( createCustomSlider ); + } + GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( 0.0, lower, 1e6, SPIN_STEP, SPIN_PAGE_STEP, 0 ) ); if (tracker) { tracker->addAdjustment(adj); -- cgit v1.2.3 From f3756ff85a32f4b2a0771d0ac3bd78a69535395f Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Fri, 3 Jun 2011 11:44:52 +0100 Subject: Use generic headers in preparation for GTK+ 3 transition Fixed bugs: - https://launchpad.net/bugs/792263 (bzr r10252.1.1) --- src/widgets/select-toolbar.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index e08b4ac61..108fae1ef 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -17,7 +17,6 @@ #endif #include -#include #include "widgets/button.h" #include "widgets/spw-utilities.h" -- cgit v1.2.3 From a1f1e29a8a207ea7ef4be583a050778cf2875217 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 13 Jun 2011 01:28:49 +0100 Subject: Replace deprecated GtkSignal (bzr r10282.1.1) --- src/widgets/select-toolbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 108fae1ef..7012badf8 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -295,7 +295,7 @@ static EgeAdjustmentAction * create_adjustment_action( gchar const *name, g_object_set( act, "short_label", Q_(shortLabel), NULL ); } - gtk_signal_connect( GTK_OBJECT(adj), "value_changed", GTK_SIGNAL_FUNC(sp_object_layout_any_value_changed), spw ); + g_signal_connect( G_OBJECT(adj), "value_changed", G_CALLBACK(sp_object_layout_any_value_changed), spw ); if ( focusTarget ) { ege_adjustment_action_set_focuswidget( act, focusTarget ); } @@ -398,7 +398,7 @@ static GtkAction* create_action_for_verb( Inkscape::Verb* verb, Inkscape::UI::Vi InkAction* inky = ink_action_new( verb->get_id(), verb->get_name(), verb->get_tip(), verb->get_image(), size ); act = GTK_ACTION(inky); - g_signal_connect( G_OBJECT(inky), "activate", GTK_SIGNAL_FUNC(trigger_sp_action), targetAction ); + g_signal_connect( G_OBJECT(inky), "activate", G_CALLBACK(trigger_sp_action), targetAction ); Inkscape::queueIconPrerender( verb->get_image(), size ); @@ -518,8 +518,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb g_object_set_data( G_OBJECT(spw), "contextActions", contextActions ); // Force update when selection changes. - gtk_signal_connect(GTK_OBJECT(spw), "modify_selection", GTK_SIGNAL_FUNC(sp_selection_layout_widget_modify_selection), desktop); - gtk_signal_connect(GTK_OBJECT(spw), "change_selection", GTK_SIGNAL_FUNC(sp_selection_layout_widget_change_selection), desktop); + g_signal_connect(G_OBJECT(spw), "modify_selection", G_CALLBACK(sp_selection_layout_widget_modify_selection), desktop); + g_signal_connect(G_OBJECT(spw), "change_selection", G_CALLBACK(sp_selection_layout_widget_change_selection), desktop); // Update now. sp_selection_layout_widget_update(SP_WIDGET(spw), SP_ACTIVE_DESKTOP ? sp_desktop_selection(SP_ACTIVE_DESKTOP) : NULL); -- cgit v1.2.3 From 98d4e7826b44154cbe89747a1d27f033fb012755 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 2 Jul 2011 15:07:10 +0200 Subject: Be accurate when changing width/height in the toolbar, in case geometric bounding boxes are used (bzr r10403) --- src/widgets/select-toolbar.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 7012badf8..eb9b2805d 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -242,7 +242,14 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) gdouble strokewidth = stroke_average_width (selection->itemList()); int transform_stroke = prefs->getBool("/options/transform/stroke", true) ? 1 : 0; - Geom::Affine scaler = get_scale_transform_with_stroke (*bbox, strokewidth, transform_stroke, x0, y0, x1, y1); + Geom::Affine scaler; + if (bbox_type == SPItem::APPROXIMATE_BBOX) { + // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones! + scaler = get_scale_transform_with_stroke (*bbox, strokewidth, transform_stroke, x0, y0, x1, y1); + } else { + // we'll trick it into using a geometrical bounding box though, by setting the stroke width to zero + scaler = get_scale_transform_with_stroke (*bbox, 0, false, x0, y0, x1, y1); + } sp_selection_apply_affine(selection, scaler); DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT, -- cgit v1.2.3 From dd5da66df059871c546f4d09b9d2eb92e71b74b7 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 10 Jul 2011 21:40:56 +0200 Subject: Selector's toolbar: changing the dimensions of the visual bounding box of selection of multiple objects having different stroke widths has been fixed (bug #212768, #190557, ...) Fixed bugs: - https://launchpad.net/bugs/212768 - https://launchpad.net/bugs/190557 (bzr r10437.1.5) --- src/widgets/select-toolbar.cpp | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index eb9b2805d..ba32dc321 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -159,12 +159,16 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) document->ensureUpToDate (); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + + Geom::OptRect bbox_vis = selection->bounds(SPItem::APPROXIMATE_BBOX); + Geom::OptRect bbox_geom = selection->bounds(SPItem::GEOMETRIC_BBOX); + int prefs_bbox = prefs->getInt("/tools/bounding_box"); - SPItem::BBoxType bbox_type = (prefs_bbox ==0)? + SPItem::BBoxType bbox_type = (prefs_bbox == 0)? SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; - Geom::OptRect bbox = selection->bounds(bbox_type); + Geom::OptRect bbox_user = selection->bounds(bbox_type); - if ( !bbox ) { + if ( !bbox_user ) { g_object_set_data(G_OBJECT(spw), "update", GINT_TO_POINTER(FALSE)); return; } @@ -186,35 +190,35 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) x0 = sp_units_get_pixels (a_x->value, unit); y0 = sp_units_get_pixels (a_y->value, unit); x1 = x0 + sp_units_get_pixels (a_w->value, unit); - xrel = sp_units_get_pixels (a_w->value, unit) / bbox->dimensions()[Geom::X]; + xrel = sp_units_get_pixels (a_w->value, unit) / bbox_user->dimensions()[Geom::X]; y1 = y0 + sp_units_get_pixels (a_h->value, unit); - yrel = sp_units_get_pixels (a_h->value, unit) / bbox->dimensions()[Geom::Y]; + yrel = sp_units_get_pixels (a_h->value, unit) / bbox_user->dimensions()[Geom::Y]; } else { double const x0_propn = a_x->value * unit.unittobase; - x0 = bbox->min()[Geom::X] * x0_propn; + x0 = bbox_user->min()[Geom::X] * x0_propn; double const y0_propn = a_y->value * unit.unittobase; - y0 = y0_propn * bbox->min()[Geom::Y]; + y0 = y0_propn * bbox_user->min()[Geom::Y]; xrel = a_w->value * unit.unittobase; - x1 = x0 + xrel * bbox->dimensions()[Geom::X]; + x1 = x0 + xrel * bbox_user->dimensions()[Geom::X]; yrel = a_h->value * unit.unittobase; - y1 = y0 + yrel * bbox->dimensions()[Geom::Y]; + y1 = y0 + yrel * bbox_user->dimensions()[Geom::Y]; } // Keep proportions if lock is on GtkToggleAction *lock = GTK_TOGGLE_ACTION( g_object_get_data(G_OBJECT(spw), "lock") ); if ( gtk_toggle_action_get_active(lock) ) { if (adj == a_h) { - x1 = x0 + yrel * bbox->dimensions()[Geom::X]; + x1 = x0 + yrel * bbox_user->dimensions()[Geom::X]; } else if (adj == a_w) { - y1 = y0 + xrel * bbox->dimensions()[Geom::Y]; + y1 = y0 + xrel * bbox_user->dimensions()[Geom::Y]; } } // scales and moves, in px - double mh = fabs(x0 - bbox->min()[Geom::X]); - double sh = fabs(x1 - bbox->max()[Geom::X]); - double mv = fabs(y0 - bbox->min()[Geom::Y]); - double sv = fabs(y1 - bbox->max()[Geom::Y]); + double mh = fabs(x0 - bbox_user->min()[Geom::X]); + double sh = fabs(x1 - bbox_user->max()[Geom::X]); + double mv = fabs(y0 - bbox_user->min()[Geom::Y]); + double sv = fabs(y1 - bbox_user->max()[Geom::Y]); // unless the unit is %, convert the scales and moves to the unit if (unit.base == SP_UNIT_ABSOLUTE || unit.base == SP_UNIT_DEVICE) { @@ -244,11 +248,11 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) Geom::Affine scaler; if (bbox_type == SPItem::APPROXIMATE_BBOX) { - // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones! - scaler = get_scale_transform_with_stroke (*bbox, strokewidth, transform_stroke, x0, y0, x1, y1); + scaler = get_scale_transform_with_unequal_stroke (*bbox_vis, *bbox_geom, transform_stroke, x0, y0, x1, y1); } else { - // we'll trick it into using a geometrical bounding box though, by setting the stroke width to zero - scaler = get_scale_transform_with_stroke (*bbox, 0, false, x0, y0, x1, y1); + // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones! + // we'll trick it into using a geometric bounding box though, by setting the stroke width to zero + scaler = get_scale_transform_with_uniform_stroke (*bbox_user, 0, false, x0, y0, x1, y1); } sp_selection_apply_affine(selection, scaler); -- cgit v1.2.3 From 896fc3e9669eb94159e5471f41f95be9f8f90611 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Fri, 15 Jul 2011 02:21:05 +0200 Subject: Remove the icon-names.h thing, which was a mistake. The file now contains a no-op macro which is used to mark icon names. This way we can still generate a list of icon names we use using a simple grep, but don't trigger unnecessary rebuilds when a new icon names is added. (bzr r10452) --- src/widgets/select-toolbar.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index ba32dc321..260c09c69 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -378,9 +378,9 @@ static void toggle_pattern( GtkToggleAction* act, gpointer data ) static void toggle_lock( GtkToggleAction *act, gpointer /*data*/ ) { gboolean active = gtk_toggle_action_get_active( act ); if ( active ) { - g_object_set( G_OBJECT(act), "iconId", INKSCAPE_ICON_OBJECT_LOCKED, NULL ); + g_object_set( G_OBJECT(act), "iconId", INKSCAPE_ICON("object-locked"), NULL ); } else { - g_object_set( G_OBJECT(act), "iconId", INKSCAPE_ICON_OBJECT_UNLOCKED, NULL ); + g_object_set( G_OBJECT(act), "iconId", INKSCAPE_ICON("object-unlocked"), NULL ); } } @@ -507,7 +507,7 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb InkToggleAction* itact = ink_toggle_action_new( "LockAction", _("Lock width and height"), _("When locked, change both width and height by the same proportion"), - INKSCAPE_ICON_OBJECT_UNLOCKED, + INKSCAPE_ICON("object-unlocked"), Inkscape::ICON_SIZE_DECORATION ); g_object_set( itact, "short_label", "Lock", NULL ); g_object_set_data( G_OBJECT(spw), "lock", itact ); @@ -554,7 +554,7 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb // "Transform with object" buttons { - EgeOutputAction* act = ege_output_action_new( "transform_affect_label", _("Affect:"), _("Control whether or not to scale stroke widths, scale rectangle corners, transform gradient fills, and transform pattern fills with the object"), 0 ); + EgeOutputAction* act = ege_output_action_new( "transform_affect_label", _("Affect:"), _("Control whether or not to scale stroke widths, scale rectangle corners, transform gradient fills, and transform pattern fills with the object"), 0 ); ege_output_action_set_use_markup( act, TRUE ); g_object_set( act, "visible-overflown", FALSE, NULL ); gtk_action_group_add_action( mainActions, GTK_ACTION( act ) ); @@ -564,7 +564,7 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb 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("transform-affect-stroke"), Inkscape::ICON_SIZE_DECORATION ); 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) ; @@ -575,7 +575,7 @@ 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("transform-affect-rounded-corners"), Inkscape::ICON_SIZE_DECORATION ); 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) ; @@ -586,7 +586,7 @@ 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("transform-affect-gradient"), Inkscape::ICON_SIZE_DECORATION ); 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) ; @@ -597,7 +597,7 @@ 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("transform-affect-pattern"), Inkscape::ICON_SIZE_DECORATION ); 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) ; -- cgit v1.2.3 From 72cc39b9f0b340548f395c7f61ca9662b34aea09 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 11:04:37 +0200 Subject: Refactor SPItem bounding box methods: remove NRRect usage and make code using them more obvious. Fix filter region computation. (bzr r10582.1.1) --- src/widgets/select-toolbar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 260c09c69..5f90a8997 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -70,7 +70,7 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) if ( sel && !sel->isEmpty() ) { int prefs_bbox = prefs->getInt("/tools/bounding_box", 0); SPItem::BBoxType bbox_type = (prefs_bbox ==0)? - SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; + SPItem::VISUAL_BBOX : SPItem::GEOMETRIC_BBOX; Geom::OptRect const bbox(sel->bounds(bbox_type)); if ( bbox ) { UnitTracker *tracker = reinterpret_cast(g_object_get_data(G_OBJECT(spw), "tracker")); @@ -160,12 +160,12 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) document->ensureUpToDate (); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - Geom::OptRect bbox_vis = selection->bounds(SPItem::APPROXIMATE_BBOX); - Geom::OptRect bbox_geom = selection->bounds(SPItem::GEOMETRIC_BBOX); + Geom::OptRect bbox_vis = selection->visualBounds(); + Geom::OptRect bbox_geom = selection->geometricBounds(); int prefs_bbox = prefs->getInt("/tools/bounding_box"); SPItem::BBoxType bbox_type = (prefs_bbox == 0)? - SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX; + SPItem::VISUAL_BBOX : SPItem::GEOMETRIC_BBOX; Geom::OptRect bbox_user = selection->bounds(bbox_type); if ( !bbox_user ) { @@ -247,10 +247,10 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) int transform_stroke = prefs->getBool("/options/transform/stroke", true) ? 1 : 0; Geom::Affine scaler; - if (bbox_type == SPItem::APPROXIMATE_BBOX) { + if (bbox_type == SPItem::VISUAL_BBOX) { scaler = get_scale_transform_with_unequal_stroke (*bbox_vis, *bbox_geom, transform_stroke, x0, y0, x1, y1); } else { - // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones! + // get_scale_transform_with_stroke() is intended for visual bounding boxes, not geometrical ones! // we'll trick it into using a geometric bounding box though, by setting the stroke width to zero scaler = get_scale_transform_with_uniform_stroke (*bbox_user, 0, false, x0, y0, x1, y1); } -- cgit v1.2.3 From 74e17c3b2817c35a4a327250436da0a72b30bd96 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 3 Sep 2011 22:26:01 +0200 Subject: Allow changing dimensions of vertical/horizontal lines using the numeric input boxes on the selector toolbar Fixed bugs: - https://launchpad.net/bugs/825840 (bzr r10614) --- src/widgets/select-toolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 5f90a8997..7b8b54fee 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -252,7 +252,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) } else { // get_scale_transform_with_stroke() is intended for visual bounding boxes, not geometrical ones! // we'll trick it into using a geometric bounding box though, by setting the stroke width to zero - scaler = get_scale_transform_with_uniform_stroke (*bbox_user, 0, false, x0, y0, x1, y1); + scaler = get_scale_transform_with_uniform_stroke (*bbox_geom, 0, false, x0, y0, x1, y1); } sp_selection_apply_affine(selection, scaler); -- cgit v1.2.3 From 1c0a4eca434ada5675c6edc476325b7bb64da1a6 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 4 Sep 2011 20:11:51 +0200 Subject: 1) Fix absolute scaling in transform dialog 2) Transform dialog now follows the user prefs for geometric vs. visual bounding box (bzr r10615) --- src/widgets/select-toolbar.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/widgets/select-toolbar.cpp') diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 7b8b54fee..38346ce56 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -248,11 +248,13 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) Geom::Affine scaler; if (bbox_type == SPItem::VISUAL_BBOX) { - scaler = get_scale_transform_with_unequal_stroke (*bbox_vis, *bbox_geom, transform_stroke, x0, y0, x1, y1); + scaler = get_scale_transform_for_variable_stroke (*bbox_vis, *bbox_geom, transform_stroke, x0, y0, x1, y1); } else { - // get_scale_transform_with_stroke() is intended for visual bounding boxes, not geometrical ones! + // 1) We could have use the newer get_scale_transform_for_variable_stroke() here, but to avoid regressions + // we'll just use the old get_scale_transform_for_uniform_stroke() for now. + // 2) get_scale_transform_for_uniform_stroke() is intended for visual bounding boxes, not geometrical ones! // we'll trick it into using a geometric bounding box though, by setting the stroke width to zero - scaler = get_scale_transform_with_uniform_stroke (*bbox_geom, 0, false, x0, y0, x1, y1); + scaler = get_scale_transform_for_uniform_stroke (*bbox_geom, 0, false, x0, y0, x1, y1); } sp_selection_apply_affine(selection, scaler); -- cgit v1.2.3