diff --git a/terminatorlib/util.py b/terminatorlib/util.py index 8cb1b554..365145ce 100755 --- a/terminatorlib/util.py +++ b/terminatorlib/util.py @@ -224,11 +224,11 @@ def get_nav_offset(edge, allocation, direction): if direction == 'left': return(edge - (allocation.x + allocation.width)) elif direction == 'right': - return(edge + allocation.x) + return(allocation.x - edge) elif direction == 'up': - return(edge - (allocation.y - allocation.height)) + return(edge - (allocation.y + allocation.height)) elif direction == 'down': - return(edge + allocation.y) + return(allocation.y - edge) else: raise ValueError('Unknown direction: %s' % direction)