fix text hover - disable if outside line bounds

This commit is contained in:
Vadim Lopatin 2017-09-25 12:38:49 +03:00
parent 595aca4460
commit 41781074bf
1 changed files with 3 additions and 1 deletions

View File

@ -1848,7 +1848,9 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
_hoverMousePosition = pos; _hoverMousePosition = pos;
_hoverTextPosition = clientToTextPos(Point(x, y)); _hoverTextPosition = clientToTextPos(Point(x, y));
cancelHoverTimer(); cancelHoverTimer();
_hoverTimer = setTimer(_hoverTimeoutMillis); Rect reversePos = textPosToClient(_hoverTextPosition);
if (x < reversePos.left + 10.pointsToPixels)
_hoverTimer = setTimer(_hoverTimeoutMillis);
} }
protected void cancelHoverTimer() { protected void cancelHoverTimer() {