Thread: How ?
View Single Post
Old 16th May 2021, 14:54   #37
Major Dude
ariszlo's Avatar
Join Date: Jun 2015
Location: Hungary
Posts: 730
Do you really want to toggle cover art on and off? If you never want to turn it off then there is a much simpler way to add cover art to your main window.

1. The quick solution

Just create a nocover image and add a tag like this before the </layout> tag of player-normal.xml:

PHP Code:
<AlbumArt id="albumart" x="10" y="10" w="64" h="64" notfoundImage="nocover" ghost="1"/> 
The no cover image can be as simple as a fully transparent png of the size of the AlbumArt layer.

2. The everything-in-groups solution

If you do not like to have both group tags and a non-group AlbumArt tag in player-normal.xml then you can define a group containing the AlbumArt tag in player-normal-group.xml like this:

PHP Code:
<groupdef id="albumartgroup" w="74" h="74">
AlbumArt id="albumart" x="10" y="10" w="64" h="64" notfoundImage="nocover" ghost="1"/>
And then add this group tag before the </layout> tag of player-normal.xml:
PHP Code:
<group id="albumartgroup" x="0" y="0"/> 

Ariszló @ WinCustomize & DeviantArt
ariszlo is online now   Reply With Quote