summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-27 16:32:55 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-27 16:32:55 +0000
commitf10048be170a45921ae8fc65ccd2588a9ad2897d (patch)
treec0abadf8d3b7ffb325061d797e5b8d9d8b2aefeb /src/widgets
parentUse real world units for page sizes. (diff)
downloadinkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.tar.gz
inkscape-f10048be170a45921ae8fc65ccd2588a9ad2897d.zip
Added viewBox implement document unit support.
(bzr r12475.1.2)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp4
-rw-r--r--src/widgets/icon.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index 6493da84d..9d2d9b336 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -2132,8 +2132,8 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale)
/* The desktop region we always show unconditionally */
SPDocument *doc = dtw->desktop->doc();
- Geom::Rect darea ( Geom::Point(-doc->getWidth(), -doc->getHeight()),
- Geom::Point(2 * doc->getWidth(), 2 * doc->getHeight()) );
+ Geom::Rect darea ( Geom::Point(-doc->getWidth().value("px"), -doc->getHeight().value("px")),
+ Geom::Point(2 * doc->getWidth().value("px"), 2 * doc->getHeight().value("px")) );
Geom::OptRect deskarea;
if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) {
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index dda453bc4..feb69cc64 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -42,6 +42,7 @@
#include "display/drawing.h"
#include "io/sys.h"
#include "sp-root.h"
+#include "util/units.h"
#include "icon.h"
@@ -1137,7 +1138,7 @@ sp_icon_doc_icon( SPDocument *doc, Inkscape::Drawing &drawing,
if ( object->parent == NULL )
{
dbox = Geom::Rect(Geom::Point(0, 0),
- Geom::Point(doc->getWidth(), doc->getHeight()));
+ Geom::Point(doc->getWidth().value("px"), doc->getHeight().value("px")));
}
/* This is in document coordinates, i.e. pixels */