Skip to content

Commit

Permalink
Backport PR #2617
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Aug 21, 2015
1 parent 8f5cdd1 commit c127954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spyderlib/widgets/calltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def show_tip(self, point, tip, wrapped_tiplines):

vertical = 'bottom'
horizontal = 'Right'
if point.y() + tip_height > screen_rect.height():
if point.y() + tip_height > screen_rect.height() + screen_rect.y():
point_ = text_edit.mapToGlobal(cursor_rect.topRight())
# If tip is still off screen, check if point is in top or bottom
# half of screen.
Expand All @@ -211,7 +211,7 @@ def show_tip(self, point, tip, wrapped_tiplines):
vertical = 'top'
else:
vertical = 'top'
if point.x() + tip_width > screen_rect.width():
if point.x() + tip_width > screen_rect.width() + screen_rect.x():
point_ = text_edit.mapToGlobal(cursor_rect.topRight())
# If tip is still off-screen, check if point is in the right or
# left half of the screen.
Expand Down

0 comments on commit c127954

Please sign in to comment.