summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-13 22:23:22 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-13 22:23:22 +0300
commit362f35430a2edd76885f6cd8f3e4565260d2101a (patch)
tree22d8092d1611f252abdeaf09fc342628f1d87da1 /src/gui/widgets/textfield.cpp
parentaa03bdb26c736e7d506d656a5529cf6a4e9fe6b4 (diff)
downloadplus-362f35430a2edd76885f6cd8f3e4565260d2101a.tar.gz
plus-362f35430a2edd76885f6cd8f3e4565260d2101a.tar.bz2
plus-362f35430a2edd76885f6cd8f3e4565260d2101a.tar.xz
plus-362f35430a2edd76885f6cd8f3e4565260d2101a.zip
Remove duplicate function from graphics.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 22e5b649f..8f615fc70 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -634,12 +634,10 @@ void TextField::handleCopy() const
void TextField::drawCaret(Graphics* graphics, int x)
{
- const Rect *const clipArea = graphics->getCurrentClipArea();
- if (!clipArea)
- return;
+ const ClipRect &clipArea = graphics->getTopClip();
graphics->setColor(*mCaretColor);
- graphics->drawLine(x + mPadding, clipArea->height - mPadding,
+ graphics->drawLine(x + mPadding, clipArea.height - mPadding,
x + mPadding, mPadding);
}