#SongTree Group & Columns definitions
#####################################

{Group pic}
title= _"with picture"
head=title:h
vcollapse=head
vmin=pic:y+pic:h+2
left=pic:w+2
#title:	text(markup='<b><big>'.pesc($title).'</big></b>',pad=2)
title:	text(pad=2, markup='<span font_desc="'.myfont.'">'.pesc($title).\
		if(showyear && $year,' <small>('.pesc($year).')</small>').'</span>',\
		init_markup='<span font_desc="'.myfont.'"> </span>',)
pic:	+aapic(y=title:h+title:y+4,picsize=picsize,ypad=2)

picsize : OptionNumber(default=100,min=20,max=1000,step=10)
showyear : OptionBoolean(default=1,name='show year')
myfont : OptionFont(default='Arial Bold 18',name='font')

{Group simple}
title= _"Simple title"
head=title:h
left=4
vcollapse=head
title: text(markup='<b><big>'.pesc($title).'</big></b>',pad=4)

{Group artistalbumside}
title= _"Album and artist on the left side"
vmin= pic:y + pic:h +2
left=width
title:	text(markup='<b><big>'.pesc($album).'\n'.pesc($artist).'</big></b>',pad=2,w=left)
pic:	aapic(y=title:y + title:h +2, picsize=min(picsize,width), pad=2)
width:	OptionNumber(default=200,min=20,max=1000,step=10)
picsize : OptionNumber(default=100,min=20,max=1000,step=10)

{Column testtitleandprogress}
title= _"Title & progress"
sort=album:i title:i
width=200
songbl=text
hreq=text:h
progress: pbar( fill=$progress, hide=!$playing,y=1,h=-2)
text: text(markup=playmarkup(pesc($title)))

{Column playandqueue}
menutitle = _"Playing and queue icons"
width = 20
ico:	icon(pad=2,icon=$playicon)

{Column icolabel}
menutitle= _"Labels' icons"
sort = label:i
width = 50
ico : icon(pad=2,icon=$labelicons)

{Column titleaa}
menutitle = _"Title - Artist - Album"
title = _"Song"
hreq=text:h
width=200
sort= title:i
text : text(markup='<b>'.pesc($title).'</b>'.pesc($version_or_empty).'\n<small><i>'.pesc($artist).'</i> - '.pesc($album).'</small>',pad=2)

{Column titleandicon}
title = _"Title & icon"
sort = title:i
width = 200
songbl= text
hreq = text:h
text : text(pad=2,markup=playmarkup(pesc($title).'<small>'.pesc($version_or_empty).'</small>')),w=-icolabel:w)
icolabel : icon(pad=2,x=text:w,icon=$labelicons)

{Column albumminipic}
title = _"Small album picture"
sort = album:i
width = 20
hreq = 20
album  : aapic(picsize=$_h,aa='album')

{Column ratingpic}
title = _"Rating"
menutitle = _"Rating (picture)"
sort = rating
width=100
#hreq = pic:h
#pic : picture(file=ratingpic($rating),init_file=ratingpic(0))
pic : picture(file=ratingpic($rating),h=$_h,w=$_w,resize='ratio',init_file=ratingpic(0))

{Column right_aligned_folder}
menutitle = _"Folder (right-aligned)"
title = _"Folder"
hreq=text:h
width=200
sort= path
songbl= text
text : text(markup= pesc($path), x=-text:w)

{Group artistalbum}
title= _"Album and artist"
head=title:h
vcollapse=head
vmin=pic:y+pic:h+2
left=pic:w+2
title2:	text(markup='<b><big>'.pesc($artist).'</big></b>',pad=2,x=-title2:w)
#title2:	text(markup='by <b><big>'.pesc($artist).'</big></b>',pad=2,x=title:w)
#title:	text(markup='<b><big>'.pesc($album).'</big></b> ',pad=2)
title:	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))
pic:	+aapic(y=title:h+title:y+4,picsize=picsize,ypad=2,aa='album')
picsize : OptionNumber(default=100,min=20,max=1000,step=10)

