diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-28 22:53:56 +0000 |
|---|---|---|
| committer | Krzysztof Kosinski <tweenk.pl@gmail.com> | 2011-08-28 22:53:56 +0000 |
| commit | f4b79d4a8edc870f099fb9194c8493ec04012ad1 (patch) | |
| tree | 2951d5171168abc288c00d09d04f5e5737e779d5 /src/widgets/desktop-widget.cpp | |
| parent | Tie the snapping of rectangle corners and quadrant points of ellipses to the ... (diff) | |
| parent | Completely remove libnr (diff) | |
| download | inkscape-f4b79d4a8edc870f099fb9194c8493ec04012ad1.tar.gz inkscape-f4b79d4a8edc870f099fb9194c8493ec04012ad1.zip | |
Completely remove libnr
(bzr r10589)
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 08f0eadfb..cbfb8fe5f 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -731,15 +731,11 @@ sp_desktop_widget_realize (GtkWidget *widget) if (GTK_WIDGET_CLASS (dtw_parent_class)->realize) (* GTK_WIDGET_CLASS (dtw_parent_class)->realize) (widget); - NRRect d; - d.x0 = 0.0; - d.y0 = 0.0; - d.x1 = (dtw->desktop->doc())->getWidth (); - d.y1 = (dtw->desktop->doc())->getHeight (); + Geom::Rect d = Geom::Rect::from_xywh(Geom::Point(0,0), (dtw->desktop->doc())->getDimensions()); - if ((fabs (d.x1 - d.x0) < 1.0) || (fabs (d.y1 - d.y0) < 1.0)) return; + if (d.width() < 1.0 || d.height() < 1.0) return; - dtw->desktop->set_display_area (d.x0, d.y0, d.x1, d.y1, 10); + dtw->desktop->set_display_area (d.left(), d.top(), d.right(), d.bottom(), 10); dtw->updateNamedview(); } @@ -1881,7 +1877,7 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale) Geom::Rect darea ( Geom::Point(-doc->getWidth(), -doc->getHeight()), Geom::Point(2 * doc->getWidth(), 2 * doc->getHeight()) ); - Geom::OptRect deskarea = darea | doc->getRoot()->getBboxDesktop(); + Geom::OptRect deskarea = darea | doc->getRoot()->desktopVisualBounds(); /* Canvas region we always show unconditionally */ Geom::Rect carea( Geom::Point(deskarea->min()[Geom::X] * scale - 64, deskarea->max()[Geom::Y] * -scale - 64), |
