Wrong calculated positions for palettes #1268
This commit is contained in:
parent
2b78463830
commit
e97dd135eb
@ -195,6 +195,10 @@ class Palette(PaletteWindow):
|
|||||||
|
|
||||||
self._secondary_anim.start()
|
self._secondary_anim.start()
|
||||||
|
|
||||||
|
def on_popdown(self):
|
||||||
|
# to suppress glitches while later re-opening
|
||||||
|
self.set_palette_state(self.PRIMARY)
|
||||||
|
|
||||||
def on_enter(self, event):
|
def on_enter(self, event):
|
||||||
PaletteWindow.on_enter(self, event)
|
PaletteWindow.on_enter(self, event)
|
||||||
self._secondary_anim.start()
|
self._secondary_anim.start()
|
||||||
|
@ -333,9 +333,13 @@ class PaletteWindow(gtk.Window):
|
|||||||
if not immediate:
|
if not immediate:
|
||||||
self._popdown_anim.start()
|
self._popdown_anim.start()
|
||||||
else:
|
else:
|
||||||
self._popdown_anim.stop()
|
self.on_popdown()
|
||||||
|
self.size_request()
|
||||||
self.hide()
|
self.hide()
|
||||||
|
|
||||||
|
def on_popdown(self):
|
||||||
|
self._popdown_anim.stop()
|
||||||
|
|
||||||
def on_invoker_enter(self):
|
def on_invoker_enter(self):
|
||||||
self._mouse_detector.start()
|
self._mouse_detector.start()
|
||||||
|
|
||||||
@ -414,10 +418,7 @@ class _PopupAnimation(animator.Animation):
|
|||||||
|
|
||||||
def next_frame(self, current):
|
def next_frame(self, current):
|
||||||
if current == 1.0:
|
if current == 1.0:
|
||||||
self._palette.show()
|
self._palette.popup(immediate=True)
|
||||||
# we have to invoke update_position() twice
|
|
||||||
# since WM could ignore first move() request
|
|
||||||
self._palette.update_position()
|
|
||||||
|
|
||||||
|
|
||||||
class _PopdownAnimation(animator.Animation):
|
class _PopdownAnimation(animator.Animation):
|
||||||
@ -428,7 +429,7 @@ class _PopdownAnimation(animator.Animation):
|
|||||||
|
|
||||||
def next_frame(self, current):
|
def next_frame(self, current):
|
||||||
if current == 1.0:
|
if current == 1.0:
|
||||||
self._palette.hide()
|
self._palette.popdown(immediate=True)
|
||||||
|
|
||||||
|
|
||||||
class Invoker(gobject.GObject):
|
class Invoker(gobject.GObject):
|
||||||
|
Loading…
Reference in New Issue
Block a user