Attachments you submit will be routed for moderation. If you have an account, please
log in first.
|
File sugar-1268.patch, 2.1 KB
(added by alsroot, 4 years ago)
|
|
|
-
From b2265d692e1f39b7cac553e4dd8c3dbb16b6a76f Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Fri, 4 Sep 2009 10:05:16 +0000
Subject: Wrong calculated positions for palettes #1268
---
src/sugar/graphics/palette.py | 4 ++++
src/sugar/graphics/palettewindow.py | 13 +++++++------
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
|
b
|
|
| 195 | 195 | |
| 196 | 196 | self._secondary_anim.start() |
| 197 | 197 | |
| | 198 | def on_popdown(self): |
| | 199 | # to suppress glitches while later re-opening |
| | 200 | self.set_palette_state(self.PRIMARY) |
| | 201 | |
| 198 | 202 | def on_enter(self, event): |
| 199 | 203 | PaletteWindow.on_enter(self, event) |
| 200 | 204 | self._secondary_anim.start() |
-
diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index 454ac8d..aa5b416 100644
|
a
|
b
|
|
| 333 | 333 | if not immediate: |
| 334 | 334 | self._popdown_anim.start() |
| 335 | 335 | else: |
| 336 | | self._popdown_anim.stop() |
| | 336 | self.on_popdown() |
| | 337 | self.size_request() |
| 337 | 338 | self.hide() |
| 338 | 339 | |
| | 340 | def on_popdown(self): |
| | 341 | self._popdown_anim.stop() |
| | 342 | |
| 339 | 343 | def on_invoker_enter(self): |
| 340 | 344 | self._mouse_detector.start() |
| 341 | 345 | |
| … |
… |
|
| 414 | 418 | |
| 415 | 419 | def next_frame(self, current): |
| 416 | 420 | if current == 1.0: |
| 417 | | self._palette.show() |
| 418 | | # we have to invoke update_position() twice |
| 419 | | # since WM could ignore first move() request |
| 420 | | self._palette.update_position() |
| | 421 | self._palette.popup(immediate=True) |
| 421 | 422 | |
| 422 | 423 | |
| 423 | 424 | class _PopdownAnimation(animator.Animation): |
| … |
… |
|
| 428 | 429 | |
| 429 | 430 | def next_frame(self, current): |
| 430 | 431 | if current == 1.0: |
| 431 | | self._palette.hide() |
| | 432 | self._palette.popdown(immediate=True) |
| 432 | 433 | |
| 433 | 434 | |
| 434 | 435 | class Invoker(gobject.GObject): |
Download in other formats: