Recent Posts
None | 28 sec ago
None | 59 sec ago
PHP | 1 min ago
None | 1 min ago
C | 1 min ago
HTML | 1 min ago
None | 1 min ago
T-SQL | 1 min ago
Diff | 1 min ago
None | 2 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By BluntBox on the 29th of Apr 2008 04:11:13 AM
Download |
Raw |
Embed |
Report
--- ./pypanel 2005-06-26 16:24:43.000000000 -0700
+++ ./pypanel 2006-10-22 13:47:00.000000000 -0700
-44,19 +44,28 @@
self.focus = 0 # Currently focused window
self.rpm = None # Root pixmap ID
- global P_HEIGHT, P_WIDTH, P_LOCATION
-
+ global P_HEIGHT, P_WIDTH, P_LOCATION, P_B_BUFF, P_T_BUFF, P_L_BUFF, P_R_BUFF, P_START
+
# Misc. initializations
if SHOWLINES or SHOWBORDER:
self.lgc = self.root.create_gc(foreground=self.getColor(LINE_COLOR))
if not P_WIDTH:
P_WIDTH = self.screen.width_in_pixels - P_START
+ elif P_WIDTH:
+ P_WIDTH -= P_START
+ if P_L_BUFF != 0 and P_R_BUFF != 0:
+ P_WIDTH -= P_R_BUFF + P_START + P_L_BUFF
+ P_START += P_L_BUFF
if SHOWBORDER:
P_HEIGHT += 2
if P_LOCATION:
P_LOCATION = self.screen.height_in_pixels - P_HEIGHT
- else:
+ if P_B_BUFF != 0:
+ P_LOCATION -= P_B_BUFF
+ else:
P_LOCATION = 0
+ if P_T_BUFF != 0:
+ P_LOCATION = P_T_BUFF
# Setup the panel's window
self.window = self.screen.root.create_window(P_START, P_LOCATION,
Submit a correction or amendment below.
[ previous version ] | [ difference ] | Make A New Post