Difference between revisions of "Pending MythUI Patches"

From MythTV Official Wiki
Jump to: navigation, search
(Notes)
(Replaced content with '=== None Pending ===')
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== <pending> - buttonlist: Dynamic layout ==
+
=== None Pending ===
 
 
Add the option for "dynamic" layout of the buttons within a buttonlist.  When deciding where to position each button on the screen, the individual size of each button is considered.  This allows smaller buttons to take up less room than larger buttons within the same buttonlist.
 
 
 
<pre>
 
<buttonlist name="groups">
 
    <arrange>stack</arrange>
 
    <area>0,0,1280,70</area>
 
    <spacing>30</spacing>
 
    <scrollstyle>center</scrollstyle>
 
    <align>center</align>
 
    <wrapstyle>items</wrapstyle>
 
    <layout>horizontal</layout>
 
    <buttonarea>10,10,1260,70</buttonarea>
 
    <statetype name="buttonitem">
 
        <state name="active">
 
            <area>0,0,255,100%</area>
 
    <shape name="activeGroupShape">
 
        <area>0, 0, 100%, 85%</area>
 
        <align>allcenter</align>
 
        <minsize>10%,85%</minsize>
 
        <type>roundbox</type>
 
<fill color="#000000" alpha="90" />
 
<line color="#FFFFFF" alpha="255" width="1" />
 
<cornerradius>10</cornerradius>
 
    </shape>
 
            <textarea name="name" from="basetextarea">
 
                <area>5%,5,95%,75%</area>
 
        <minsize>5,80%</minsize>
 
<multiline>yes</multiline>
 
<align>center</align>
 
<cutdown>yes</cutdown>
 
<font>basesmaller</font>
 
            </textarea>
 
        </state>
 
        <state name="selected" from="active">
 
    <shape name="selectedGroupShape">
 
        <area>0, 0, 100%, 98%</area>
 
        <align>allcenter</align>
 
        <minsize>20%,95%</minsize>
 
        <type>box</type>
 
        <fill color="#0F0FF5" alpha="30" />
 
        <line color="#FFFFFF" alpha="255" width="2" />
 
    </shape>
 
            <textarea name="name" from="basetextarea">
 
                <area>5%,5,95%,95%</area>
 
        <minsize>15%,95%</minsize>
 
        <multiline>yes</multiline>
 
        <align>center</align>
 
        <cutdown>yes</cutdown>
 
        <font>basemedium</font>
 
            </textarea>
 
        </state>
 
        <state name="inactive" from="selected">
 
            <imagetype name="pbbgroupselect">
 
                <area>0,0,100%,98%</area>
 
                <filename>images/pbb_blueselector.png</filename>
 
                <alpha>100</alpha>
 
            </imagetype>
 
            <textarea name="name">
 
                <font>basemedium</font>
 
            </textarea>
 
        </state>
 
    </statetype>
 
</buttonlist>
 
</pre>
 
 
 
 
 
==== New <buttonlist> options: ====
 
 
 
{|cellpadding="4" border="1"
 
| style="background:mediumslateblue" |arrange
 
|Button arrangement type.<br>
 
Fixed (default) - Use the fixed position layout engine.<br>
 
Stack - Stack buttons next to each other.<br>
 
Fill - evenly spread buttons out to fill area.
 
|-
 
| style="background:mediumslateblue" |align
 
|Aligns buttons in both horizontal and vertical directions. Valid values are: left, right, top, bottom, hcenter, vcenter, center and allcenter.  Center is an alias for allcenter. Only valid with <arrange>Stack '''or''' Fill</arrange>.
 
|-
 
| style="background:mediumslateblue" | scrollstyle
 
|Sets the scrolling behavior of the buttonlist. Valid options are center (selected item is always in the center), groupcenter (selected item is allowed to float in the center of the group, so the group as a whole can stay centered) and free (selector freely moves through the list).  groupcenter is only valid with <arrange>Stack '''or''' Fill</arrange>.
 
|}
 
 
 
==== New <textarea>, <shape> and <imagetype> option enabled with <arrange>Stack ''or'' Fill</arrange> ====
 
 
 
{|cellpadding="4" border="1"
 
| style="background:mediumslateblue" |minsize
 
|Minimum size the button is allowed to shrink to.  Takes two arguments: horizontal and vertical size.  Percentages are allowed. In the case of <textarea>, the actual size of the text is determined, and the size of the textarea is shrunk if possible.  Any <shape> or <imagetype> siblings to the <textarea> are then shrunk by the same amount.
 
|}
 
 
 
== Notes ==
 
When using '''arrange''' type of '''stack''' or '''fill''', the ''behavior'' is a little different than '''arrange''' type '''fixed''' in some regards.  Because '''stack''' and '''fill''' dynamically lay out the buttons, the selected button will be "center weighted" even when the '''scrollstyle''' is '''free'''.
 
 
 
When using '''arrange''' type of '''stack''' or '''fill''' with a '''grid''' '''layout''', moving off the left or right edge of the area will move to the prev or next item, rather then just wrapping to the other side of the area.
 

Latest revision as of 20:30, 27 January 2010

None Pending