diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-19 19:09:17 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-05-19 19:09:17 +0200 |
commit | ff83cfac10939ceba524c93d4e36f634f4bec805 (patch) | |
tree | d481913f2136bf04d2d1deb650e6bd084a531676 /plugingui/lineedit.cc | |
parent | a3dc9bd19f976cbc84ba3d1a16c72257b42b28ba (diff) |
Make sure we don't resize to negative values.
Diffstat (limited to 'plugingui/lineedit.cc')
-rw-r--r-- | plugingui/lineedit.cc | 2 |
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; } |