[Pychord-commits] r45 - trunk/pgui
danilo at garage.maemo.org
danilo at garage.maemo.org
Thu Mar 6 03:01:49 EET 2008
Author: danilo
Date: 2008-03-06 03:01:38 +0200 (Thu, 06 Mar 2008)
New Revision: 45
Modified:
trunk/pgui/button.py
trunk/pgui/combo.py
trunk/pgui/locale.py
Log:
- Change the code to align in left combo options
Modified: trunk/pgui/button.py
===================================================================
--- trunk/pgui/button.py 2008-03-05 02:48:22 UTC (rev 44)
+++ trunk/pgui/button.py 2008-03-06 01:01:38 UTC (rev 45)
@@ -49,12 +49,8 @@
width = self.label.size[0] + bsize*2 + padding*2
if align == pguiAlignCenter:
- print self.label.size
- print width, height
- print bsize,padding
desX = (width - self.label.size[0] - bsize*2 -padding*2)/2
desY = (height - self.label.size[1] - bsize*2 -padding*2)/2
- print [desX,desY]
self.label.move([desX,desY])
# creating the box
Modified: trunk/pgui/combo.py
===================================================================
--- trunk/pgui/combo.py 2008-03-05 02:48:22 UTC (rev 44)
+++ trunk/pgui/combo.py 2008-03-06 01:01:38 UTC (rev 45)
@@ -64,7 +64,7 @@
p = 0
for key in options.keys():
- btn = Tbutton(self,[10,p*pguiDefFontSize + 10],options[key], width = width - 20, bgcolor = bgcolor)
+ btn = Tbutton(self,[10,p*pguiDefFontSize + 10],options[key], width = width - 20, align = pguiAlignLeft, bgcolor = bgcolor)
btn.registerClickSlot(self.select,key)
self.addElement(btn)
p += 1
Modified: trunk/pgui/locale.py
===================================================================
--- trunk/pgui/locale.py 2008-03-05 02:48:22 UTC (rev 44)
+++ trunk/pgui/locale.py 2008-03-06 01:01:38 UTC (rev 45)
@@ -8,6 +8,7 @@
# Align Flags
pguiAlignCenter = 1 # Default Align position
+pguiAlignLeft = 2 # AlignLeft position
More information about the Pychord-commits
mailing list