[mythtv-theming] [0.27] Design problems/questions
Angela
angela.schmid at wolke7.net
Thu Jan 30 02:22:19 UTC 2014
> I am redesigning the image gallery (grid) in the Arclight theme and in the
> thumbnail grid I wanted the filename only for directories displayed in the
> thumbnail.
>
> <statetype name="nodetype">
> <state name="subfolder">
>
> Seems to work only. Other states like 'image', 'file', 'upfolder' are not
> working, is this correct?
>
>
>
> Solving the unavailable 'image' or 'file' state a came across some
oddities,
> which are maybe problems or intended to be working as is, please comment:
>
> I have an area and want to position an image in the right upper corner,
only
> the first code snippet works, all others display the image in the left
upper
> corner, why?
> Does the statetype widget not propagate the parent height and width
> information further down? Does it also only process position widgets and
> ignores area widgets inside?
>
> <buttonlist name="buttonlist_gallery">
> <spacing>0</spacing>
> <area>0,0,1920,1080</area>
> <align>bottom,hcenter</align>
> <searchposition>610,340</searchposition>
> <layout>grid</layout>
> <scrollstyle>free</scrollstyle>
> <arrange>stack</arrange>
> <wrapstyle>flowing</wrapstyle>
> <showarrow>no</showarrow>
> <drawfrombottom>no</drawfrombottom>
> <buttonarea>40,40,100%-80,1000</buttonarea>
> <spacing>9</spacing>
> <statetype name="buttonitem">
> <state name="active">
> <area>0,0,280,280</area>
> <imagetype name="buttonimage">
> <area>0,0,280,280</area>
>
> <mask>images/masks/mask_rounded_border_medium.png</mask>
> <filename>images/shared/DefaultPicture.png</filename>
> </imagetype>
>
>
> // image on the right upper corner of the thumb, correct
> <area>0,0,300,300</area>
> <statetype name="nodetype">
> <position>100%-90,5</position>
> <state name="subfolder">
> <imagetype name="icon">
> <area>0,0,80,80</area>
> <filename>images.png</filename>
> <preserveaspect>yes</preserveaspect>
> </imagetype>
> </state>
>
> // on the right upper corner but image is not resized
> <area>0,0,300,300</area>
> <statetype name="nodetype">
> <area>100%-90,5,80,80</area>
> <state name="subfolder">
> <imagetype name="icon">
> <filename>images.png</filename>
> <preserveaspect>yes</preserveaspect>
>
> </imagetype>
> </state>
>
> // image on the left upper corner, image resized.
> <area>0,0,300,300</area>
> <statetype name="nodetype">
> <position>0,0</position>
> <state name="subfolder">
> <imagetype name="icon">
> <area>100%-90,5,80,80</area>
> <filename>images.png</filename>
> <preserveaspect>yes</preserveaspect>
> </imagetype>
> </state>
>
> I noticed that I can't use statetypes more than once, is this true?
>
> <statetype name="nodetype">
> <state name="subfolder"> ...
> <statetype name="nodetype">
> <state name="subfolder">
>
> Even surrounding those with groups doesn't work, it takes the last
> occurrence.
>
> <group name="group1">
> <statetype name="nodetype">
> <state name="subfolder">
> ....
> <group name="group2">
> <statetype name="nodetype">
> <state name="subfolder">
>
>
>
>
> It is not possible to call a group from within a statetype when it uses
relative
> positioning/sizing.
>
> <group name="textgroup">
> <area>10,10,-5,-5</area> ......
>
> <statetype name="nodetype">
> <state name="subfolder">
> <imagetype name="icon">
> <area>190,5,80,80</area>
> <filename>images/folderclosed.png</filename>
> <preserveaspect>yes</preserveaspect>
> </imagetype>
> <group name="metadata1" from="textgroup">
> <area>0,0,280,280</area> (also not working without
> it)
> </group>
>
> </state>
>
One of the issues I was having lies in the fact, that variable when they are
in a further statetype
<statetype name="buttonitem">
<state name="active">
<statetype name="nodetype">
<state name="subfolder">
<textarea name="buttontext" from="basetextarea">
<-- this variable will not be filled
</state>
</statetype>
<textarea name="buttontext" from="basetextarea">
<-- this variable will be filled, its direct parent is the buttonitem
statetype
I could resolve my issue using a dependency, so that the filename only is
displayed for directories, not for images within the gallery thumbnails.
The childcount variable is only displayed for directories:
<statetype name="buttonitem">
<state name="active"> <statetype name="nodetype">
<statetype name="nodetype">
<state name="subfolder">
</state>
</statetype> <
<textarea name="childcount" from="basetextarea">
<group name="metadata" from="basefilemetadata"
depends="childcount"/> <-- direct parent is the buttonitem statetype
More information about the mythtv-theming
mailing list