[mythtv-theming] buttonlist and active/inactive/selected states

Ronald Frazier ron at ronfrazier.net
Wed Dec 9 02:17:19 UTC 2009


I'm currently working on a theme. In the Watch Recordings screen,  I
have a few questions about implementing the button lists.

Previously in 0.21, the lists would be drawn as follows. When a list
was focused, the selected item would be drawn in the "selected" state
(well...."selected" function, as it was referred to back then), and
all other items would be drawn in "active" state. When the list lost
focus, the selected item would continue to be in the "selected" state,
however the rest of the items would revert to the "inactive" state.
This was handy because when the list was not selected, you could make
all the non-selected items switch to a dimmer color, so your focus
would only be on the selected item (everything else could appear as if
disabled).

Now, with 0.22 buttonlists I'm finding this behavior is a bit
different. All of the non-selected items remain in the "active" state
whether the list is focused or not. However, the selected item
switched between "selected" and "inactive" states. So in other words,
when the list is NOT focused, the selected item is "inactive" and
everything else is "active". That seems backward to me. Is this a bug?
If not, what's the reasoning behind that?

I can understand wanting to add an alternate state for the selected
item, but not at the expense of non-selected items. Is there some way
to work around this (perhaps a 4th state I'm unaware of, even though
the docs suggest only 3 states)?


FYI, here is the code I'm using to generate the buttonlist:

<buttonlist name="groups">
    <area>0,100,330,380</area>
    <buttonarea>20,20,290,340</buttonarea>
    <wrapstyle>selection</wrapstyle>
    <scrollstyle>free</scrollstyle>
    <layout>vertical</layout>
    <spacing>3</spacing>
    <statetype name="buttonitem">
        <state name="active">
            <area>0,0,290,40</area>
            <imagetype name="buttonbackground" />
            <textarea name="name" from="basetextarea">
                <area>10,0,270,40</area>
            </textarea>
        </state>
        <state name="selected" from="active">
            <imagetype name="buttonbackground">
                <filename>ui/selectbar_left_panel_2.png</filename>
            </imagetype>
            <textarea name="name">
                <font>yellow_small</font>
            </textarea>
        </state>
        <state name="inactive" from="active">
            <textarea name="name">
                <font>darkgray_small</font>
            </textarea>
        </state>
    </statetype>
</buttonlist>


-- 
Ron


More information about the mythtv-theming mailing list