summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-27 13:20:17 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-27 13:20:17 +0000
commit79012ca437ff3d7c25e4d164b1b9c3dccc2b4b7f (patch)
tree9cc58ddb8d243fd9f78e7a57024bb929a2362404 /src/widgets
parentUpdate 2Geom. Remove all use of NRRectL. (diff)
downloadinkscape-79012ca437ff3d7c25e4d164b1b9c3dccc2b4b7f.tar.gz
inkscape-79012ca437ff3d7c25e4d164b1b9c3dccc2b4b7f.zip
Remove NRRect from paint servers and temporary calculations
(bzr r10582.1.4)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index fff9c0a5c..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();
}