Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sugar/graphics/palette.py4
-rw-r--r--src/sugar/graphics/palettewindow.py13
2 files changed, 11 insertions, 6 deletions
diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py
index f58e7ac..2ea2376 100644
--- a/src/sugar/graphics/palette.py
+++ b/src/sugar/graphics/palette.py
@@ -195,6 +195,10 @@ class Palette(PaletteWindow):
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):
PaletteWindow.on_enter(self, event)
self._secondary_anim.start()
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index 454ac8d..aa5b416 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -333,9 +333,13 @@ class PaletteWindow(gtk.Window):
if not immediate:
self._popdown_anim.start()
else:
- self._popdown_anim.stop()
+ self.on_popdown()
+ self.size_request()
self.hide()
+ def on_popdown(self):
+ self._popdown_anim.stop()
+
def on_invoker_enter(self):
self._mouse_detector.start()
@@ -414,10 +418,7 @@ class _PopupAnimation(animator.Animation):
def next_frame(self, current):
if current == 1.0:
- self._palette.show()
- # we have to invoke update_position() twice
- # since WM could ignore first move() request
- self._palette.update_position()
+ self._palette.popup(immediate=True)
class _PopdownAnimation(animator.Animation):
@@ -428,7 +429,7 @@ class _PopdownAnimation(animator.Animation):
def next_frame(self, current):
if current == 1.0:
- self._palette.hide()
+ self._palette.popdown(immediate=True)
class Invoker(gobject.GObject):