1#SongTree Group & Columns definitions 2##################################### 3 4{Group pic} 5title= _"with picture" 6head=title:h 7vcollapse=head 8vmin=pic:y+pic:h+2 9left=pic:w+2 10#title: text(markup='<b><big>'.pesc($title).'</big></b>',pad=2) 11title: text(pad=2, markup='<span font_desc="'.myfont.'">'.pesc($title).\ 12 if(showyear && $year,' <small>('.pesc($year).')</small>').'</span>',\ 13 init_markup='<span font_desc="'.myfont.'"> </span>',) 14pic: +aapic(y=title:h+title:y+4,picsize=picsize,ypad=2) 15 16picsize : OptionNumber(default=100,min=20,max=1000,step=10) 17showyear : OptionBoolean(default=1,name='show year') 18myfont : OptionFont(default='Arial Bold 18',name='font') 19 20{Group simple} 21title= _"Simple title" 22head=title:h 23left=4 24vcollapse=head 25title: text(markup='<b><big>'.pesc($title).'</big></b>',pad=4) 26 27{Group artistalbumside} 28title= _"Album and artist on the left side" 29vmin= pic:y + pic:h +2 30left=width 31title: text(markup='<b><big>'.pesc($album).'\n'.pesc($artist).'</big></b>',pad=2,w=left) 32pic: aapic(y=title:y + title:h +2, picsize=min(picsize,width), pad=2) 33width: OptionNumber(default=200,min=20,max=1000,step=10) 34picsize : OptionNumber(default=100,min=20,max=1000,step=10) 35 36{Column testtitleandprogress} 37title= _"Title & progress" 38sort=album:i title:i 39width=200 40songbl=text 41hreq=text:h 42progress: pbar( fill=$progress, hide=!$playing,y=1,h=-2) 43text: text(markup=playmarkup(pesc($title))) 44 45{Column playandqueue} 46menutitle = _"Playing and queue icons" 47width = 20 48ico: icon(pad=2,icon=$playicon) 49 50{Column icolabel} 51menutitle= _"Labels' icons" 52sort = label:i 53width = 50 54ico : icon(pad=2,icon=$labelicons) 55 56{Column titleaa} 57menutitle = _"Title - Artist - Album" 58title = _"Song" 59hreq=text:h 60width=200 61sort= title:i 62text : text(markup='<b>'.pesc($title).'</b>'.pesc($version_or_empty).'\n<small><i>'.pesc($artist).'</i> - '.pesc($album).'</small>',pad=2) 63 64{Column titleandicon} 65title = _"Title & icon" 66sort = title:i 67width = 200 68songbl= text 69hreq = text:h 70text : text(pad=2,markup=playmarkup(pesc($title).'<small>'.pesc($version_or_empty).'</small>')),w=-icolabel:w) 71icolabel : icon(pad=2,x=text:w,icon=$labelicons) 72 73{Column albumminipic} 74title = _"Small album picture" 75sort = album:i 76width = 20 77hreq = 20 78album : aapic(picsize=$_h,aa='album') 79 80{Column ratingpic} 81title = _"Rating" 82menutitle = _"Rating (picture)" 83sort = rating 84width=100 85#hreq = pic:h 86#pic : picture(file=ratingpic($rating),init_file=ratingpic(0)) 87pic : picture(file=ratingpic($rating),h=$_h,w=$_w,resize='ratio',init_file=ratingpic(0)) 88 89{Column right_aligned_folder} 90menutitle = _"Folder (right-aligned)" 91title = _"Folder" 92hreq=text:h 93width=200 94sort= path 95songbl= text 96text : text(markup= pesc($path), x=-text:w) 97 98{Group artistalbum} 99title= _"Album and artist" 100head=title:h 101vcollapse=head 102vmin=pic:y+pic:h+2 103left=pic:w+2 104title2: text(markup='<b><big>'.pesc($artist).'</big></b>',pad=2,x=-title2:w) 105#title2: text(markup='by <b><big>'.pesc($artist).'</big></b>',pad=2,x=title:w) 106#title: text(markup='<b><big>'.pesc($album).'</big></b> ',pad=2) 107title: text(markup='<b><big>'.pesc($album).'</big></b> ' . if($year,'<small>('.pesc($year).')</small>'),pad=2,w=min($_w-title2:wr-10,title:wr+2*title:xpad)) 108pic: +aapic(y=title:h+title:y+4,picsize=picsize,ypad=2,aa='album') 109picsize : OptionNumber(default=100,min=20,max=1000,step=10) 110 111