MediaPortal Windows Media Center

Site navigation


Last Edit

Page last modified 16:27, 4 Dec 2010 by Dadeo
MediaPortal Wiki > MediaPortal 1 > Contribute > Skins > Skin Related Changes > 1.1.0 to 1.2.0 > StackLayout shift buttons

StackLayout shift buttons

Was this page helpful?

    Purpose

    • Required:  No
    • Type of Change:  Feature

    In a Group control using layout StackLayout, if a button is hidden due to its visibility condition, there will be a "hole" in its place. With a new parameter for StackLayout, the visible buttons will shift so as to not have these "holes".

    Description of Change

    A 3rd argument has been added to StackLayout with possible values of "true" or "false". If set to "true", then buttons in a group control with a StackLayout that are hidden will be "removed" and the surrounding buttons shifted so there are no gaps between buttons. If set to "false" or omitted then hidden buttons will leave an empty space.

    Default = false (preserves the existing behaviour in MP)

    • StackLayout(int spacing, Orientation orientation, bool CollapseHiddenButtons)

    Additional Information and References

    Mantis Issue 3241
    Related xml(s) all that use StackLayout
    Windows IDs  
    Related GUI control GUIGroup, Group, Layout
    Author Migue
    Date added Fri, 03 Dec 2010

    XML/Code Samples

    <control>
        <description>button group</description>
        <type>group</type>
        <animation effect="slide" time="450" start="-300,0" reversible="false">visible</animation>
        <animation effect="slide" time="450" end="-300,0" reversible="false">hidden</animation>
        <posX>40</posX>
        <posY>97</posY>
        <layout>StackLayout(0, Vertical, true)</layout>
        <visible>!Control.HasFocus(50)</visible>
    <control>
        <description>Switch Layout</description>
        <type>button</type>
        <id>2</id>
        <label>100</label>
        <onright>50</onright>
        <onup>17</onup>
    </control>
    <control>
        <description>Sort</description>
        <type>sortbutton</type>
        <id>3</id>
        <label>103</label>
        <onright>50</onright>
        <onup>2</onup>
    </control>
    <control>
        <description>Test</description>
        <type>button</type>
        <id>1337</id>
        <label>Test</label>
        <onright>50</onright>
        <onup>3</onup>
        <visible>player.paused</visible>
    </control>
    <control>
        <description>Switch View</description>
        <type>button</type>
        <id>5</id>
        <label>457</label>
        <onright>50</onright>
        <onup>3</onup>
    </control>
    <control>
        <description>Play DVD</description>
        <type>button</type>
        <id>6</id>
        <label>341</label>
        <onright>50</onright>
        <onup>5</onup>
        <ondown>20</ondown>
    </control>

    Screenshots

    This screenshot shows the behavior if value is "false" or omitted and player is playing(test button hidden):

    19-05-48.png

    This screenshot shows behavior if vaule is "true":

    19-09-12.png




    Running the latest version?

    V1.6.0 - released December 2013
    Releasenews | Download
    Changelog
     | Requirements
    HTPC
    Team-MediaPortal
     
    About
    Contact |  Press
    Partners