X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=scripts%2Fmotion.py;h=2d6939c519c6f4416d98abe370d79550ca1a960c;hb=43c1f2a8f84d8008155d6df8e2bcd35534c62893;hp=88b82e5c4e172b539e6af1da1bfe489d1b08c73c;hpb=1c97e9fb7bede1607b9680d29a791a72b1768019;p=chaz%2Fopenbox diff --git a/scripts/motion.py b/scripts/motion.py index 88b82e5c..2d6939c5 100644 --- a/scripts/motion.py +++ b/scripts/motion.py @@ -145,12 +145,13 @@ def _do_move(): _popwidget = otk.Widget(_screen, ob.openbox, otk.Widget.Horizontal, 0, 1) _poplabel = otk.Label(_popwidget) + _poplabel.setHighlighted(1) _poplabel.setText(text) scsize = otk.display.screenInfo(_screen).size() size = _poplabel.minSize() - _popwidget.resize(_poplabel.minSize()) - _popwidget.move(otk.Point((scsize.width() - size.width()) / 2, - (scsize.height() - size.height()) / 2)) + _popwidget.moveresize(otk.Rect((scsize.width() - size.width()) / 2, + (scsize.height() - size.height()) / 2, + size.width(), size.height())) _popwidget.show(1) def _move(data): @@ -213,8 +214,6 @@ def _do_resize(): w = _cw + dx h = _ch + dy - if w < 0: w = 0 - if h < 0: h = 0 if RESIZE_RUBBERBAND: # draw the outline ... @@ -230,12 +229,13 @@ def _do_resize(): _popwidget = otk.Widget(_screen, ob.openbox, otk.Widget.Horizontal, 0, 1) _poplabel = otk.Label(_popwidget) + _poplabel.setHighlighted(1) _poplabel.setText(text) scsize = otk.display.screenInfo(_screen).size() size = _poplabel.minSize() - _popwidget.resize(_poplabel.minSize()) - _popwidget.move(otk.Point((scsize.width() - size.width()) / 2, - (scsize.height() - size.height()) / 2)) + _popwidget.moveresize(otk.Rect((scsize.width() - size.width()) / 2, + (scsize.height() - size.height()) / 2, + size.width(), size.height())) _popwidget.show(1) def _resize(data):