Difference between revisions of "Pending MythUI Patches"

From MythTV Official Wiki
Jump to: navigation, search
(Notes)
Line 1: Line 1:
== <pending> - buttonlist: Dynamic layout ==
+
== <pending> - textarea autosize ==
 
 
http://svn.mythtv.org/trac/ticket/7461
 
  
 
http://svn.mythtv.org/trac/ticket/7462
 
http://svn.mythtv.org/trac/ticket/7462
 
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.
 
{|border="1"
 
|Fixed (default) - Use the fixed position layout engine.
 
|-
 
|Stack - Stack buttons next to each other.  Buttons will be <spacing> apart from each other.
 
|-
 
|Fill - Buttons will be distributed over the entire <buttonarea>.  The spacing between buttons may be different on either side of the selected button, if <scrollstyle> center is specified.
 
|-
 
|Spread - Spread out the buttons as much as possible, while keeping the spacing between buttons consistent.
 
|}
 
|-
 
| 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, Fill '''or''' Spread</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, Fill '''or''' Spread</arrange>.
 
|}
 
  
 
==== New <textarea>, <shape> and <imagetype> options ====
 
==== New <textarea>, <shape> and <imagetype> options ====
Line 99: Line 9:
 
|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.
 
|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'''.
 
 
* The selected button is positioned first, and then all other buttons are positioned in relationship to the selected button.
 

Revision as of 16:41, 26 January 2010

<pending> - textarea autosize

http://svn.mythtv.org/trac/ticket/7462

New <textarea>, <shape> and <imagetype> options

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.