- Moderator
- #1
Hi
If you use the new feature in StackLayout for a group:
0003241: Auto placing of controls in grouped StackLayout - MediaPortal Bugtracker
as documented in the Wiki:
StackLayout shift buttons - MediaPortal Wiki
You will have an issue if one or more of your buttons has a conditional visibility, like this, where the "Now Playing" button only shows, when media is actually playing (which makes sense to me):
It actually has two issues:
- an extra 5px blank space is put in where the button was, so you have 10px space between two of the buttons
- the position of the buttons below the hidden one, are misplaced:
I see two ways of dealing with this; either disallow conditional visibility on buttons in a group (not my idea) or patch up to deal with buttons that can have conditional visibility.
I'll try the last option at some time in the holiday
If you use the new feature in StackLayout for a group:
0003241: Auto placing of controls in grouped StackLayout - MediaPortal Bugtracker
as documented in the Wiki:
StackLayout shift buttons - MediaPortal Wiki
You will have an issue if one or more of your buttons has a conditional visibility, like this, where the "Now Playing" button only shows, when media is actually playing (which makes sense to me):
Code:
<control>
<description>group element</description>
<type>group</type>
<posX>71</posX>
<posY>121</posY>
<layout>StackLayout(5, Vertical, true)</layout>
<animation effect="slide" time="250" start="-300,0" reversible="false">visible</animation>
<animation effect="slide" time="250" end="-300,0" reversible="false">hidden</animation>
<visible>!Control.HasFocus(50)</visible>
<control>
<description>View-As button</description>
<type>button</type>
<id>2</id>
<label>100</label>
<onright>50</onright>
<onup>17</onup>
<ondown>20</ondown>
</control>
<control>
<description>Shuffle button</description>
<type>button</type>
<id>20</id>
<label>191</label>
<onright>50</onright>
<onup>2</onup>
<ondown>30</ondown>
</control>
<control>
<description>Repeat on/off button</description>
<type>togglebutton</type>
<id>30</id>
<label>486</label>
<onright>50</onright>
<onup>20</onup>
<ondown>10</ondown>
</control>
<control>
<description>My Playlists</description>
<type>button</type>
<id>10</id>
<label>983</label>
<onright>50</onright>
<onup>30</onup>
<ondown>21</ondown>
</control>
<control>
<description>Save button</description>
<type>button</type>
<id>21</id>
<label>190</label>
<onright>50</onright>
<onup>10</onup>
<ondown>22</ondown>
</control>
<control>
<description>Clear button</description>
<type>button</type>
<id>22</id>
<label>192</label>
<onright>50</onright>
<onup>21</onup>
<ondown>26</ondown>
</control>
<control>
<description>Now playing</description>
<type>button</type>
<id>26</id>
<label>4540</label>
<hyperlink>510</hyperlink>
<onright>50</onright>
<onup>22</onup>
<ondown>28</ondown>
<visible>Player.HasAudio</visible>
</control>
<control>
<description>scrobble mode button</description>
<type>button</type>
<id>28</id>
<label>33001</label>
<onright>50</onright>
<onup>26</onup>
<ondown>27</ondown>
<visible>plugin.isenabled(Audioscrobbler)</visible>
</control>
<control>
<description>scrobble on/off button</description>
<type>togglebutton</type>
<id>27</id>
<label>33000</label>
<onright>50</onright>
<onup>28</onup>
<ondown>29</ondown>
<visible>plugin.isenabled(Audioscrobbler)</visible>
</control>
<control>
<description>scrobble user button</description>
<type>button</type>
<id>29</id>
<label>Scrobbler: </label>
<onright>50</onright>
<onup>27</onup>
<ondown>99</ondown>
<visible>plugin.isenabled(Audioscrobbler)</visible>
</control>
</control>
It actually has two issues:
- an extra 5px blank space is put in where the button was, so you have 10px space between two of the buttons
- the position of the buttons below the hidden one, are misplaced:
I see two ways of dealing with this; either disallow conditional visibility on buttons in a group (not my idea) or patch up to deal with buttons that can have conditional visibility.
I'll try the last option at some time in the holiday