Update of /cvsroot/freevo/freevo/skins/dischi1
In directory sc8-pr-cvs1:/tmp/cvs-serv16296
Modified Files:
blue2.xml listing_area.py
Log Message:
fixed some alignments
Index: blue2.xml
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/blue2.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** blue2.xml 23 Mar 2003 07:20:46 -0000 1.3
--- blue2.xml 23 Mar 2003 11:38:49 -0000 1.4
***************
*** 36,40 ****
</listing>
! <view layout="view0" x="590" y="170" width="200" height="300"/>
<info layout="info" x="40" y="410" width="760" height="170"/>
</menuset>
--- 36,40 ----
</listing>
! <view layout="view0" x="590" y="160" width="200" height="300"/>
<info layout="info" x="40" y="410" width="760" height="170"/>
</menuset>
***************
*** 52,58 ****
<menuset label="image menu with info" inherits="audio menu with info">
<subtitle visible="no"/>
! <listing y="100" height="350" width="720" layout="image list">
! <image label="uparrow" y="137" filename="up.png"/>
! <image label="downarrow" y="415" filename="down.png"/>
</listing>
<view visible="no"/>
--- 52,58 ----
<menuset label="image menu with info" inherits="audio menu with info">
<subtitle visible="no"/>
! <listing x="10" y="100" height="350" width="780" layout="image list">
! <image label="uparrow" x="750" y="102" height="24" width="24"/>
! <image label="downarrow" x="750" y="422" height="24" width="24"/>
</listing>
<view visible="no"/>
***************
*** 131,137 ****
<!-- listing area for audio with images -->
<layout label="audio list">
! <content x="0" y="0" type="image" spacing="-2" align="center" valign="center">
! <item type="default" width="100" height="100"/>
! <item type="selected" width="100" height="100">
<rectangle bgcolor="selection" size="0" x="-10" y="-10" width="max+20"
height="max+20"/>
--- 131,137 ----
<!-- listing area for audio with images -->
<layout label="audio list">
! <content x="0" y="0" type="image" spacing="-2">
! <item type="default" width="100" height="100" align="center" valign="center"/>
! <item type="selected" width="100" height="100" align="center" valign="center">
<rectangle bgcolor="selection" size="0" x="-10" y="-10" width="max+20"
height="max+20"/>
***************
*** 142,148 ****
<!-- listing area for video with images -->
<layout label="video list">
! <content type="image" spacing="-2" align="center" valign="center">
! <item type="default" width="80" height="112"/>
! <item type="selected" width="87" height="122">
<rectangle bgcolor="selection" size="0" x="-5" y="-5" width="max+10"
height="max+10"/>
--- 142,148 ----
<!-- listing area for video with images -->
<layout label="video list">
! <content type="image" spacing="-2">
! <item type="default" width="80" height="112" align="center" valign="center"/>
! <item type="selected" width="87" height="122" align="center" valign="center">
<rectangle bgcolor="selection" size="0" x="-5" y="-5" width="max+10"
height="max+10"/>
***************
*** 156,164 ****
<rectangle color="0x000000" size="1" bgcolor="0xa0000000" radius="5"/>
</background>
! <content type="image+text" spacing="3" align="center" valign="center">
! <item type="default" width="120" height="90" font="item"/>
! <item type="selected" width="198" height="126" font="selected">
! <rectangle bgcolor="0xa0ffffff" size="0" x="-5" y="-5" width="max+10"
radius="5"
! height="max+10"/>
</item>
</content>
--- 156,166 ----
<rectangle color="0x000000" size="1" bgcolor="0xa0000000" radius="5"/>
</background>
! <content type="image+text" spacing="-16" align="center" valign="center">
! <item type="default" width="120" height="90" font="item" align="center"
! valign="center"/>
! <item type="selected" width="198" height="126" font="selected"
! align="center" valign="center">
! <rectangle bgcolor="0xa0ffffff" size="0" x="-3" y="-3" width="max+6"
radius="5"
! height="max+6"/>
</item>
</content>
Index: listing_area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/listing_area.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** listing_area.py 22 Mar 2003 22:20:22 -0000 1.14
--- listing_area.py 23 Mar 2003 11:38:49 -0000 1.15
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.15 2003/03/23 11:38:49 dischi
+ # fixed some alignments
+ #
# Revision 1.14 2003/03/22 22:20:22 dischi
# fixed a redraw bug
***************
*** 245,250 ****
self.get_items_geometry(settings, menu, self.display_style)
! item_x0 = content.x
! item_y0 = content.y
current_col = 1
--- 248,261 ----
self.get_items_geometry(settings, menu, self.display_style)
!
! if content.align == 'center':
! item_x0 = content.x + (content.width - cols * hspace) / 2
! else:
! item_x0 = content.x
!
! if content.valign == 'center':
! item_y0 = content.y + (content.height - rows * vspace) / 2
! else:
! item_y0 = content.y
current_col = 1
***************
*** 266,279 ****
val = content.types['default']
- if content.align == 'center':
- x0 = item_x0 + (hspace - val.width) / 2
- else:
- x0 = item_x0
-
- if content.valign == 'center':
- y0 = item_y0 + (vspace - val.height) / 2
- else:
- y0 = item_y0
-
text = choice.name
if not text:
--- 277,280 ----
***************
*** 288,291 ****
--- 289,294 ----
if content.type == 'text':
+ x0 = item_x0
+ y0 = item_y0
icon_x = 0
if choice.icon:
***************
*** 314,326 ****
elif content.type == 'image' or content.type == 'image+text':
! if val.rectangle:
! rec_h = val.height
! if content.type == 'image+text':
! rec_h += int(val.font.h * 1.1)
! r = self.get_item_rectangle(val.rectangle, val.width, rec_h)[2]
! self.drawroundbox(x0 + hskip + r.x, y0 + vskip + r.y,
! r.width, r.height, r)
image = format_image(settings, choice, val.width, val.height,
force=TRUE)
--- 317,337 ----
elif content.type == 'image' or content.type == 'image+text':
! rec_h = val.height
! if content.type == 'image+text':
! rec_h += int(1.1 * val.font.h)
! if val.align == 'center':
! x0 = item_x0 + (hspace - val.width) / 2
! else:
! x0 = item_x0 + hskip
+ if val.valign == 'center':
+ y0 = item_y0 + (vspace - rec_h) / 2
+ else:
+ y0 = item_y0 + vskip
+
+ if val.rectangle:
+ r = self.get_item_rectangle(val.rectangle, val.width, rec_h)[2]
+ self.drawroundbox(x0 + r.x, y0 + r.y, r.width, r.height, r)
image = format_image(settings, choice, val.width, val.height,
force=TRUE)
***************
*** 330,350 ****
addx = 0
addy = 0
! if content.align == 'center' and i_w < val.width:
addx = (val.width - i_w) / 2
! if content.align == 'right' and i_w < val.width:
addx = val.width - i_w
! if content.valign == 'center' and i_h < val.height:
addy = (val.height - i_h) / 2
! if content.valign == 'bottom' and i_h < val.height:
addy = val.height - i_h
! self.draw_image(image, (x0 + hskip + addx, y0 + vskip + addy))
if content.type == 'image+text':
! self.write_text(choice.name, val.font, content, x=x0 + hskip,
! y=y0 + vskip + val.height, width=val.width,
height=-1,
align_h=val.align, mode='hard', ellipses='')
--- 341,361 ----
addx = 0
addy = 0
! if val.align == 'center' and i_w < val.width:
addx = (val.width - i_w) / 2
! if val.align == 'right' and i_w < val.width:
addx = val.width - i_w
! if val.valign == 'center' and i_h < val.height:
addy = (val.height - i_h) / 2
! if val.valign == 'bottom' and i_h < val.height:
addy = val.height - i_h
! self.draw_image(image, (x0 + addx, y0 + addy))
if content.type == 'image+text':
! self.write_text(choice.name, val.font, content, x=x0,
! y=y0 + val.height, width=val.width, height=-1,
align_h=val.align, mode='hard', ellipses='')
***************
*** 353,357 ****
if current_col == cols:
! item_x0 = content.x
item_y0 += vspace
current_col = 1
--- 364,371 ----
if current_col == cols:
! if content.align == 'center':
! item_x0 = content.x + (content.width - cols * hspace) / 2
! else:
! item_x0 = content.x
item_y0 += vspace
current_col = 1
***************
*** 361,367 ****
# print arrow:
! if menuw.menu_items[0] != menu.choices[0] and area.images['uparrow']:
! self.draw_image(area.images['uparrow'].filename, area.images['uparrow'])
! if menuw.menu_items[-1] != menu.choices[-1] and area.images['downarrow']:
! self.draw_image(area.images['downarrow'].filename,
area.images['downarrow'])
self.last_choices = (menu.selected, copy.copy(menuw.menu_items))
--- 375,386 ----
# print arrow:
! try:
! if menuw.menu_items[0] != menu.choices[0] and area.images['uparrow']:
! self.draw_image(area.images['uparrow'].filename,
area.images['uparrow'])
! if menuw.menu_items[-1] != menu.choices[-1] and area.images['downarrow']:
! self.draw_image(area.images['downarrow'].filename,
area.images['downarrow'])
! except IndexError:
! # empty menu
! pass
!
self.last_choices = (menu.selected, copy.copy(menuw.menu_items))
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog