diff options
-rw-r--r-- | gui/editable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/editable.cpp b/gui/editable.cpp index f62f95459c..208383fe4b 100644 --- a/gui/editable.cpp +++ b/gui/editable.cpp @@ -56,7 +56,7 @@ void EditableWidget::setEditString(const String &str) { _editString = str; _caretPos = _editString.size(); - _editScrollOffset = (g_gui.getStringWidth(_editString) - (getEditRect().width()), _font); + _editScrollOffset = g_gui.getStringWidth(_editString, _font) - getEditRect().width(); if (_editScrollOffset < 0) _editScrollOffset = 0; } |