Update of /cvsroot/freevo/freevo/skins/dischi1 In directory sc8-pr-cvs1:/tmp/cvs-serv29691
Modified Files: area.py blue_round2.xml listing_area.py movie_watermark.png xml_skin.py Log Message: Some bug fixes, some speed-ups. blue_round2 has a correct main menu, but on the main menu the idle bar still flickers (stupid watermarks), on other menus it's ok. Index: area.py =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/area.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** area.py 27 Feb 2003 22:39:49 -0000 1.5 --- area.py 1 Mar 2003 00:12:17 -0000 1.6 *************** *** 38,41 **** --- 38,46 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.6 2003/03/01 00:12:17 dischi + # Some bug fixes, some speed-ups. blue_round2 has a correct main menu, + # but on the main menu the idle bar still flickers (stupid watermarks), + # on other menus it's ok. + # # Revision 1.5 2003/02/27 22:39:49 dischi # The view area is working, still no extended menu/info area. The *************** *** 190,196 **** self.alpha_bg.blit(self.background, (rect[0], rect[1]), rect) self.alpha_bg.blit(self.alpha, (rect[0], rect[1]), rect) - osd.screen.blit(self.alpha_bg, (rect[0], rect[1]), rect) - self.content_alpha = [] if not area.visible: --- 195,201 ---- self.alpha_bg.blit(self.background, (rect[0], rect[1]), rect) self.alpha_bg.blit(self.alpha, (rect[0], rect[1]), rect) self.content_alpha = [] + osd.screen.blit(self.alpha_bg, (area.x, area.y), + (area.x, area.y, area.width, area.height)) if not area.visible: *************** *** 205,212 **** return ! for rect in self.content_alpha: ! self.alpha_bg.blit(self.background, (rect[0], rect[1]), rect) ! self.alpha_bg.blit(self.alpha, (rect[0], rect[1]), rect) ! osd.screen.blit(self.alpha_bg, (rect[0], rect[1]), rect) self.content_alpha = [] --- 210,214 ---- return ! self.redraw_alpha += self.content_alpha self.content_alpha = [] *************** *** 216,241 **** for rect in self.redraw_background: ! # FIXME: redraw background self.alpha_bg.blit(self.background, rect[:2], rect) ! ! for rect in self.redraw_alpha: # redraw alpha means to create a new merge of background # and alpha on alpha_bg and blit it into osd.screen ! self.alpha_bg.blit(self.background, rect[:2], rect) ! self.alpha_bg.blit(self.alpha, rect[:2], rect) self.redraw_alpha = [] self.redraw_background = [] if old_area: ! osd.screen.blit(self.alpha_bg, (old_area.x,old_area.y), ! (old_area.x, old_area.y, old_area.width, ! old_area.height)) ! ! osd.screen.blit(self.alpha_bg, (area.x,area.y), ! (area.x, area.y, area.width, area.height)) --- 218,251 ---- for rect in self.redraw_background: ! # redraw background self.alpha_bg.blit(self.background, rect[:2], rect) ! if self.redraw_alpha: # redraw alpha means to create a new merge of background # and alpha on alpha_bg and blit it into osd.screen ! x0 = osd.width ! y0 = osd.height ! x1 = 0 ! y1 = 0 ! ! for rect in self.redraw_alpha: ! x0 = min(x0, rect[0]) ! y0 = min(y0, rect[1]) ! x1 = max(x1, rect[0] + rect[2]) ! y1 = max(y1, rect[1] + rect[3]) ! self.alpha_bg.blit(self.background, (x0, y0), (x0, y0, x1-x0, y1-y0)) ! self.alpha_bg.blit(self.alpha, (x0, y0), (x0, y0, x1-x0, y1-y0)) self.redraw_alpha = [] self.redraw_background = [] + # now blit the alpha_bg on the osd.screen if old_area: ! osd.screen.blit(self.alpha_bg, old_area.pos(self.name), ! old_area.rect(self.name)) + # FIXME: at this point with blue_round2 we blit the hole screen, + osd.screen.blit(self.alpha_bg, area.pos(self.name), area.rect(self.name)) *************** *** 363,369 **** area = self.area_val ! if hasattr(self, 'has_watermark') and self.has_watermark: ! self.redraw = TRUE ! self.has_watermark = FALSE for bg in copy.deepcopy(self.layout.background): --- 373,385 ---- area = self.area_val ! redraw_watermark = self.redraw ! last_watermark = None ! ! if hasattr(self, 'watermark') and self.watermark: ! last_watermark = self.watermark[4] ! if self.menu.selected.image != self.watermark[4]: ! self.redraw_background += [ self.watermark[:4] ] ! self.watermark = None ! redraw_watermark = TRUE for bg in copy.deepcopy(self.layout.background): *************** *** 382,387 **** if bg.label == 'watermark' and self.menu.selected.image: imagefile = self.menu.selected.image ! self.has_watermark = TRUE ! self.redraw = TRUE else: imagefile = bg.filename --- 398,405 ---- if bg.label == 'watermark' and self.menu.selected.image: imagefile = self.menu.selected.image ! if last_watermark != imagefile: ! self.redraw = TRUE ! redraw_watermark = TRUE ! self.watermark = (bg.x, bg.y, bg.width, bg.height, imagefile) else: imagefile = bg.filename *************** *** 399,409 **** self.imagecache[cname] = image if image: ! self.draw_image(image, bg, redraw=self.redraw) ! elif isinstance(bg, xml_skin.XML_rectangle): self.calc_geometry(bg) self.drawroundbox(bg.x, bg.y, bg.width, bg.height, bg, redraw=self.redraw) ! def drawroundbox(self, x, y, width, height, rect, redraw=TRUE): --- 417,429 ---- self.imagecache[cname] = image if image: ! self.draw_image(image, bg, redraw=redraw_watermark) ! elif isinstance(bg, xml_skin.XML_rectangle): self.calc_geometry(bg) self.drawroundbox(bg.x, bg.y, bg.width, bg.height, bg, redraw=self.redraw) ! if redraw_watermark: ! self.redraw = TRUE ! def drawroundbox(self, x, y, width, height, rect, redraw=TRUE): *************** *** 468,478 **** if redraw: self.background.blit(image, (val.x, val.y)) ! self.redraw_background += [ (val.x, val.y, val.width, val.height) ] ! if val.label == 'background': ! osd.screen.blit(image, (val.x, val.y)) else: self._draw_image += [ ( image, (val.x, val.y)) ] - - - --- 488,495 ---- if redraw: self.background.blit(image, (val.x, val.y)) ! # really redraw or is this a watermark problem? ! if self.redraw: ! self.redraw_background += [ (val.x, val.y, val.width, val.height) ] else: self._draw_image += [ ( image, (val.x, val.y)) ] Index: blue_round2.xml =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/blue_round2.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blue_round2.xml 27 Feb 2003 22:39:50 -0000 1.1 --- blue_round2.xml 1 Mar 2003 00:12:18 -0000 1.2 *************** *** 5,19 **** <main> ! <item pos="0" name=" Watch TV" action="tv.tv.main_menu" arg="" visible="yes" icon="" image="skins/dischi1/tv_watermark.png" /> ! <item pos="1" name=" Watch a Movie" action="MediaMenu().main_menu" arg="video" visible="yes" icon="" image="skins/dischi1/movie_watermark.png" /> ! <item pos="2" name=" Listen to Music" action="MediaMenu().main_menu" arg="audio" visible="yes" icon="" image="skins/dischi1/music_watermark.png" /> ! <item pos="3" name=" Look at Pictures" action="MediaMenu().main_menu" arg="image" visible="yes" icon="" image="skins/dischi1/image_watermark.png" /> <item pos="4" name="Games" action="MediaMenu().main_menu" arg="games" visible="no" icon="" image="" /> ! <item pos="5" name=" Shutdown" action="ShutdownItem" arg="" visible="yes" icon="" image="skins/dischi1/shutdown_watermark.png" /> </main> --- 5,19 ---- <main> ! <item pos="0" name="Watch TV" action="tv.tv.main_menu" arg="" visible="yes" icon="" image="skins/dischi1/tv_watermark.png" /> ! <item pos="1" name="Watch a Movie" action="MediaMenu().main_menu" arg="video" visible="yes" icon="" image="skins/dischi1/movie_watermark.png" /> ! <item pos="2" name="Listen to Music" action="MediaMenu().main_menu" arg="audio" visible="yes" icon="" image="skins/dischi1/music_watermark.png" /> ! <item pos="3" name="Look at Pictures" action="MediaMenu().main_menu" arg="image" visible="yes" icon="" image="skins/dischi1/image_watermark.png" /> <item pos="4" name="Games" action="MediaMenu().main_menu" arg="games" visible="no" icon="" image="" /> ! <item pos="5" name="Shutdown" action="ShutdownItem" arg="" visible="yes" icon="" image="skins/dischi1/shutdown_watermark.png" /> </main> *************** *** 42,45 **** --- 42,47 ---- </menu> + + <menu type="main"> <!-- definition of the main menu --> *************** *** 48,52 **** </screen> <listing layout="list_main" visible="yes"> ! <area x="230" y="120" width="380" height="390"/> </listing> </menu> --- 50,54 ---- </screen> <listing layout="list_main" visible="yes"> ! <area x="230" y="180" width="360" height="240"/> </listing> </menu> *************** *** 80,85 **** <background> <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/> ! <image filename="../images/logo.png" x="10" y="0" width="200" height="98"/> ! <image x="500" y="300" width="300" height="300" label="watermark"/> </background> </layout> --- 82,86 ---- <background> <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/> ! <image x="435" y="230" width="370" height="380" label="watermark"/> </background> </layout> *************** *** 131,138 **** <layout label="list_main"> <content type="text" spacing="10"> ! <item type="default" font="white shadow1 big"/> ! <item type="selected" font="white shadow3 big"> ! <rectangle bgcolor="0xa0000000" size="0" y="-5" x="-10" ! width="max+20" height="max+10" radius="5"/> </item> </content> --- 132,139 ---- <layout label="list_main"> <content type="text" spacing="10"> ! <item type="default" font="main menu font" align="center"/> ! <item type="selected" font="main menu font" align="center"> ! <rectangle bgcolor="0xaa000000" size="0" x="-3" y="-3" ! width="max+6" height="max+6" radius="8"/> </item> </content> *************** *** 141,144 **** --- 142,153 ---- <!-- ********************************************** --> <!-- FONT DEFINITIONS --> + + + <font label="main menu font"> + <definition name="Arial_Bold" color="0xffffff" size="18"/> + <shadow visible="no"/> + </font> + + <font label="white shadow1"> Index: listing_area.py =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/listing_area.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** listing_area.py 27 Feb 2003 22:39:50 -0000 1.1 --- listing_area.py 1 Mar 2003 00:12:18 -0000 1.2 *************** *** 10,13 **** --- 10,18 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.2 2003/03/01 00:12:18 dischi + # Some bug fixes, some speed-ups. blue_round2 has a correct main menu, + # but on the main menu the idle bar still flickers (stupid watermarks), + # on other menus it's ok. + # # Revision 1.1 2003/02/27 22:39:50 dischi # The view area is working, still no extended menu/info area. The *************** *** 136,143 **** rw = 0 if ct.rectangle: ! rw, rh, r = self.get_item_rectangle(ct.rectangle, font_w, font_h) hskip = min(hskip, r.x) vskip = min(vskip, r.y) ! items_h = max(items_h, font_h, rh) items_w = max(items_w, font_w, rw) --- 141,148 ---- rw = 0 if ct.rectangle: ! rw, rh, r = self.get_item_rectangle(ct.rectangle, content.width, font_h) hskip = min(hskip, r.x) vskip = min(vskip, r.y) ! items_h = max(items_h, font_h, rh) items_w = max(items_w, font_w, rw) *************** *** 146,151 **** self.area_val, self.layout = backup ! items_w ! items_h cols = 0 --- 151,160 ---- self.area_val, self.layout = backup ! # shrink width for text menus ! # FIXME ! width = content.width ! ! if items_w > width: ! width, items_w = width - (items_w - width), width cols = 0 *************** *** 160,166 **** rows += 1 ! # return cols, rows, item_w, item_h return (cols, rows, items_w + content.spacing, ! items_h + content.spacing, -hskip, -vskip) --- 169,175 ---- rows += 1 ! # return cols, rows, item_w, item_h, content.width return (cols, rows, items_w + content.spacing, ! items_h + content.spacing, -hskip, -vskip, width) *************** *** 191,195 **** content = self.calc_geometry(layout.content, copy_object=TRUE) ! cols, rows, hspace, vspace, hskip, vskip = \ self.get_items_geometry(settings, menu) --- 200,204 ---- content = self.calc_geometry(layout.content, copy_object=TRUE) ! cols, rows, hspace, vspace, hskip, vskip, width = \ self.get_items_geometry(settings, menu) *************** *** 197,202 **** y0 = content.y - width = content.width - for choice in menuw.menu_items: if choice == menu.selected: --- 206,209 ---- *************** *** 238,248 **** if val.rectangle: None, None, r = self.get_item_rectangle(val.rectangle, width, font_h) - if hskip + r.x + r.width > width: - r.width = width - hskip - r.y self.drawroundbox(x0 + hskip + r.x + icon_x, y0 + vskip + r.y, r.width - icon_x, r.height, r) ! self.write_text(text, font, content, x=x0 + hskip + icon_x, y=y0 + vskip, ! width=width-icon_x, height=-1, mode='hard') else: --- 245,254 ---- if val.rectangle: None, None, r = self.get_item_rectangle(val.rectangle, width, font_h) self.drawroundbox(x0 + hskip + r.x + icon_x, y0 + vskip + r.y, r.width - icon_x, r.height, r) ! self.write_text(text, font, content, x=x0 + hskip + icon_x, y=y0 + vskip, ! width=width-icon_x, height=-1, align_h=val.align, ! mode='hard') else: Index: movie_watermark.png =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/movie_watermark.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsvRQ1ts and /tmp/cvs6IsKYV differ Index: xml_skin.py =================================================================== RCS file: /cvsroot/freevo/freevo/skins/dischi1/xml_skin.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xml_skin.py 27 Feb 2003 22:39:50 -0000 1.15 --- xml_skin.py 1 Mar 2003 00:12:20 -0000 1.16 *************** *** 10,13 **** --- 10,18 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.16 2003/03/01 00:12:20 dischi + # Some bug fixes, some speed-ups. blue_round2 has a correct main menu, + # but on the main menu the idle bar still flickers (stupid watermarks), + # on other menus it's ok. + # # Revision 1.15 2003/02/27 22:39:50 dischi # The view area is working, still no extended menu/info area. The *************** *** 305,310 **** self.x += config.OVERSCAN_X self.y += config.OVERSCAN_Y - class XML_menu: def __init__(self): --- 310,327 ---- self.x += config.OVERSCAN_X self.y += config.OVERSCAN_Y + def rect(self, type): + if type == 'screen': + return (self.x - config.OVERSCAN_X, self.y - config.OVERSCAN_X, + self.width + 2 * config.OVERSCAN_X, + self.height + 2 * config.OVERSCAN_X) + return (self.x, self.y, self.width, self.height) + + def pos(self, type): + if type == 'screen': + return (self.x - config.OVERSCAN_X, self.y - config.OVERSCAN_X) + return (self.x, self.y) + + class XML_menu: def __init__(self): *************** *** 347,351 **** type = attr_str(subnode, "type", '') if type and not self.types.has_key(type): ! self.types[type] = XML_data(('font',)) self.types[type].rectangle = None if type: --- 364,368 ---- type = attr_str(subnode, "type", '') if type and not self.types.has_key(type): ! self.types[type] = XML_data(('font', 'align', 'valign')) self.types[type].rectangle = None if type: ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog