diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-11-24 19:56:53 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-11-24 19:56:53 +0000 |
| commit | bad0504958a10f1b99db3ae2557305541f388a52 (patch) | |
| tree | 2fdec1e71db3d37d097e07cdd5b210eaaa844bcf /src/ui/tool/node.cpp | |
| parent | Extensions: try to calculate the SVG unit (diff) | |
| download | inkscape-bad0504958a10f1b99db3ae2557305541f388a52.tar.gz inkscape-bad0504958a10f1b99db3ae2557305541f388a52.zip | |
Units: make it absolutely clear that Document properties unit dropdown is for UI Display Units. Upon document load, calculate the units used for SVG values, if a viewbox is available. If not, default to "px" SVG units.
Change all code to use either Display units OR svg units.
(bzr r13751)
Diffstat (limited to 'src/ui/tool/node.cpp')
| -rw-r--r-- | src/ui/tool/node.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 8a1ca0b90..8c22f7c6e 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -566,9 +566,9 @@ Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/) const Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px"); Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px"); Inkscape::Util::Quantity len_q = Inkscape::Util::Quantity(length(), "px"); - GString *x = g_string_new(x_q.string(_desktop->namedview->doc_units).c_str()); - GString *y = g_string_new(y_q.string(_desktop->namedview->doc_units).c_str()); - GString *len = g_string_new(len_q.string(_desktop->namedview->doc_units).c_str()); + GString *x = g_string_new(x_q.string(_desktop->namedview->display_units).c_str()); + GString *y = g_string_new(y_q.string(_desktop->namedview->display_units).c_str()); + GString *len = g_string_new(len_q.string(_desktop->namedview->display_units).c_str()); Glib::ustring ret = format_tip(C_("Path handle tip", "Move handle by %s, %s; angle %.2f°, length %s"), x->str, y->str, angle, len->str); g_string_free(x, TRUE); @@ -1490,8 +1490,8 @@ Glib::ustring Node::_getDragTip(GdkEventMotion */*event*/) const Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px"); Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px"); - GString *x = g_string_new(x_q.string(_desktop->namedview->doc_units).c_str()); - GString *y = g_string_new(y_q.string(_desktop->namedview->doc_units).c_str()); + GString *x = g_string_new(x_q.string(_desktop->namedview->display_units).c_str()); + GString *y = g_string_new(y_q.string(_desktop->namedview->display_units).c_str()); Glib::ustring ret = format_tip(C_("Path node tip", "Move node by %s, %s"), x->str, y->str); g_string_free(x, TRUE); g_string_free(y, TRUE); |
