From 761532ab5adca4caf451e90392d873648c92c8ce Mon Sep 17 00:00:00 2001 From: speleo3 Date: Wed, 25 Feb 2009 19:05:55 +0000 Subject: [PATCH] make snap tooltip position sensitive to canvas zooming --- src/display/snap-indicator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/display/snap-indicator.cpp b/src/display/snap-indicator.cpp index 0ba4d7786..b9f7ee1d4 100644 --- a/src/display/snap-indicator.cpp +++ b/src/display/snap-indicator.cpp @@ -214,8 +214,9 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const p) _snaptarget = _desktop->add_temporary_canvasitem(canvasitem, timeout_val); gchar *tooltip_str = g_strconcat(source_name, _(" to "), target_name, NULL); + Geom::Point tooltip_pos = p.getPoint() + _desktop->w2d(Geom::Point(15, -15)); - SPCanvasItem *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(_desktop), _desktop, p.getPoint() + Geom::Point(15, -15), tooltip_str); + SPCanvasItem *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(_desktop), _desktop, tooltip_pos, tooltip_str); g_free(tooltip_str); sp_canvastext_set_anchor((SPCanvasText* )canvas_tooltip, -1, 1); @@ -286,4 +287,4 @@ SnapIndicator::remove_snapsource() fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 : -- 2.30.2