(2021-08-09, 10:58)roidy Wrote: (2021-08-09, 10:11)mardukL Wrote: hm. i am bad at explaining.
i try again via adding description tags in the controls, you'll just have to care about
Thanks, now I understand. However that method has a problem for my use case, you can't set the aspect ratio of the resource image as it also changes the aspect ratio of the underlying border as can be seen in this image.
watch gallery
The top image has no aspect ratio set but the bottom uses <aspectratio>keep</aspectratio> so as not to distort the logos, but as you can see this also effects the border texture and reveals the label behind
I need to rethink this view.... either make the items square of just scrap it altogether.
Big thanks though for taking the time to help
hm. i canot test atm.but i think i got
workin result in using the diffuse attribute
<aspectratio scalediffuse="false">stretch</aspectratio> in the layer 1 image control
and
diffuse="**"
<aspectratio scalediffuse="false">scale</aspectratio> in the studio logo image control
EDIT or
<aspectratio scalediffuse="true">keep</aspectratio>in the studio logo image control
eg using an 1:1 img in diffuse attribute
watch gallery
EDIT 2:
Put my test code as reference
using an empty img =alpha 00, but keep bordertexture in layer 1
has benefit have the correct offset of the image control control type applied
xml:
<bordertexture colordiffuse="green">artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name].png</bordertexture>
<texture>colors/none.png</texture>
my test code, as i had to leave now for a while
xml:
<control type="group">
<description>ARTWORK</description>
<centerleft>50%</centerleft>
<width>$PARAM[artwork_size_w]</width>
<height>$PARAM[artwork_size_h]</height>
<control type="image">
<description>ARTWORK : BG / FRAME</description>
<texture diffuse="artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name]border.png">colors/white.png</texture>
<colordiffuse>$PARAM[artwork_frame_color]</colordiffuse>
</control>
<control type="group">
<visible>String.StartsWith(ListItem.Icon,default) | String.IsEqual(ListItem.Label,$LOCALIZE[284]) | [Container.Content(studios) | string.isequal(listitem.dbtype,studio)]</visible>
<control type="image">
<description>ARTWORK : workaround icons with alpha00 - fallback img - </description>
<left>$PARAM[artwork_bordersize]</left>
<top>$PARAM[artwork_bordersize]</top>
<right>$PARAM[artwork_bordersize]</right>
<bottom>$PARAM[artwork_bordersize]</bottom>
<bordersize>$PARAM[artwork_bordersize]</bordersize>
<bordertexture colordiffuse="ff131313">artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name].png</bordertexture>
<texture colordiffuse="00ffffff">artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name].png</texture>
</control>
<control type="textbox">
<description>label center</description>
<centertop>50%</centertop>
<width>$PARAM[artwork_size_w]</width>
<height>$PARAM[artwork_size_h]</height>
<font>CommonTag</font>
<align>center</align>
<wrapmultiline>true</wrapmultiline>
<textcolor>white</textcolor>
<selectedcolor>white</selectedcolor>
<label>$INFO[ListItem.Label]</label>
</control>
<control type="image">
<description>ARTWORK : workaround icons with alpha00 - layer 1 - need tp have aspact keep in real icon img</description>
<left>$PARAM[artwork_bordersize]</left>
<top>$PARAM[artwork_bordersize]</top>
<right>$PARAM[artwork_bordersize]</right>
<bottom>$PARAM[artwork_bordersize]</bottom>
<bordersize>$PARAM[artwork_bordersize]</bordersize>
<bordertexture colordiffuse="ff131313">artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name].png</bordertexture>
<texture background="true" colordiffuse="$PARAM[fallback_alpha_defaulticon_color]" diffuse="artworkdiffuse$PARAM[unthemed_postfix]/$PARAM[artwork_name].png">$VAR[ImageLayout_$PARAM[artwork_name]]</texture>
<aspectratio scalediffuse="true">keep</aspectratio>
</control>
</control>
...
</control>