summaryrefslogtreecommitdiff
path: root/plugingui/lineedit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/lineedit.cc')
-rw-r--r--plugingui/lineedit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugingui/lineedit.cc b/plugingui/lineedit.cc
index 96bf56f..5dd8bc5 100644
--- a/plugingui/lineedit.cc
+++ b/plugingui/lineedit.cc
@@ -237,7 +237,7 @@ void LineEdit::repaintEvent(RepaintEvent *repaintEvent)
while(true)
{
int textWidth = font.textWidth(visibleText);
- if(textWidth <= (w - BORDER - 4 + 3))
+ if(textWidth <= std::max(w - BORDER - 4 + 3, 0))
{
break;
}