r6961 - bigboard/trunk/bigboard
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6961 - bigboard/trunk/bigboard
- Date: Tue, 4 Dec 2007 16:48:59 -0600 (CST)
Author: hp
Date: 2007-12-04 16:48:59 -0600 (Tue, 04 Dec 2007)
New Revision: 6961
Modified:
bigboard/trunk/bigboard/slideout.py
Log:
keep slideouts on the screen
Modified: bigboard/trunk/bigboard/slideout.py
===================================================================
--- bigboard/trunk/bigboard/slideout.py 2007-12-04 22:33:50 UTC (rev 6960)
+++ bigboard/trunk/bigboard/slideout.py 2007-12-04 22:48:59 UTC (rev 6961)
@@ -27,6 +27,15 @@
self.slideout_from(coords[0] + item.get_allocation()[0] + 4, coords[1])
def slideout_from(self, x, y):
+ screen_w = gtk.gdk.screen_width()
+ screen_h = gtk.gdk.screen_height()
+ (ignorex, ignorey, w, h) = self.get_allocation()
+ offscreen_right = x + w - screen_w
+ offscreen_bottom = y + h - screen_h
+ if offscreen_right > 0:
+ x = x - offscreen_right
+ if offscreen_bottom > 0:
+ y = y - offscreen_bottom
self.move(x, y)
self.present_with_time(gtk.get_current_event_time())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]