From 99771c63bae03397a56aa656e6c32244af9a1556 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 3 Aug 2008 18:00:28 +0000 Subject: (svn r13979) -Codechange: Use widget dimensions instead of magic number incantations for limiting small map area. --- src/smallmap_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/smallmap_gui.cpp') diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index cb42b720b..b87f32947 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -896,7 +896,8 @@ public: } } - if (!FillDrawPixelInfo(&new_dpi, 3, 17, this->width - 28 + 22, this->height - 64 - 11 - diff)) return; + const Widget *wi = &this->widget[SM_WIDGET_MAP]; + if (!FillDrawPixelInfo(&new_dpi, wi->left + 1, wi->top + 1, wi->right - wi->left - 1, wi->bottom - wi->top - 1)) return; this->DrawSmallMap(&new_dpi); } -- cgit v1.2.3-54-g00ecf