summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 20:31:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 20:31:52 +0300
commit29f929794c7519b049de0be3af635f05d7e83be6 (patch)
tree5627bfcb7f19a349f065c207476c871bc5c3aa40 /src/gui/widgets/browserbox.cpp
parent41d545176ffad2fb33158ca3415d2a0a983fffdb (diff)
downloadplus-29f929794c7519b049de0be3af635f05d7e83be6.tar.gz
plus-29f929794c7519b049de0be3af635f05d7e83be6.tar.bz2
plus-29f929794c7519b049de0be3af635f05d7e83be6.tar.xz
plus-29f929794c7519b049de0be3af635f05d7e83be6.zip
move some methods from base/graphics into render/graphics.
Remove base/graphcs.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d7ce9ab12..e0fbf3d17 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -37,10 +37,11 @@
#include "utils/stringutils.h"
#include "utils/timer.h"
-#include "gui/base/graphics.hpp"
#include "gui/base/font.hpp"
#include "gui/base/cliprectangle.hpp"
+#include "render/graphics.h"
+
#include <algorithm>
#include "debug.h"
@@ -446,13 +447,15 @@ void BrowserBox::mouseMoved(gcn::MouseEvent &event)
? static_cast<int>(i - mLinks.begin()) : -1;
}
-void BrowserBox::draw(gcn::Graphics *graphics)
+void BrowserBox::draw(Graphics *graphics)
{
BLOCK_START("BrowserBox::draw")
- const gcn::ClipRectangle &cr = graphics->getCurrentClipArea();
+ const gcn::ClipRectangle *const cr = graphics->getCurrentClipArea();
+ if (!cr)
+ return;
Graphics *const graphics2 = static_cast<Graphics *const>(graphics);
- mYStart = cr.y - cr.yOffset;
- const int yEnd = mYStart + cr.height;
+ mYStart = cr->y - cr->yOffset;
+ const int yEnd = mYStart + cr->height;
if (mYStart < 0)
mYStart = 0;