StackLayout with items of different hight fails filling gaps (fixed in 1.3 alpha) (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    MediaPortal Version: 1.2.3

    Description
    I have s StackLayout with several items, one which is smaller than the others for spacing. I also have an item that is visible on top on condition and one on the bottom on the opposite condition (I want to have the Layout aligned to the bottom, spacer item should not have a lable in final version).
    When the top item is visible, the layout works fine (screenshot 1), when the top item is invisible, the yPos of the items is shifted down (it seems like the yPos of the invisible item is not ignored).
    Code:
        <control>
          <type>group</type>
          <description>group element</description>
          <visible></visible>
          <animation effect="fade" time="250">WindowOpen</animation>
          <animation effect="fade" time="250">WindowClose</animation>
          <posX>490</posX>
          <posY>570</posY>
          <layout>StackLayout(0, Vertical, true)</layout>
          <control>
            <description>Placeholder</description>
            <type>button</type>
            <id>1</id>
            <width>350</width>
            <height>44</height>
            <label>TEST</label>
            <textureFocus>-</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <visible>![ [ !string.equals(#DetailSeriesID,0)+plugin.isenabled(MP-TV Series) ] | [ !string.equals(#DetailMovPicID,0)+plugin.isenabled(Moving Pictures) ] ]</visible>
          </control>
          <control Style="HiddenMenuItems">
            <description>Record</description>
            <type>button</type>
            <id>12</id>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#ClickfinderPG.Translation.Record</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>13</ondown>
            <onup>10</onup>
            <visible></visible>
          </control>
     
          <control Style="HiddenMenuItems">
            <description>Remember</description>
            <type>button</type>
            <id>13</id>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#ClickfinderPG.Translation.Remember</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>11</ondown>
            <onup>12</onup>
            <visible></visible>
          </control>
     
          <control Style="HiddenMenuItems">
            <description>View Channel</description>
            <type>button</type>
            <id>11</id>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#ClickfinderPG.Translation.ChannelON</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>130</ondown>
            <onup>13</onup>
            <visible></visible>
          </control>
          <control>
            <description>Placeholder</description>
            <type>button</type>
            <id>138475834</id>
            <width>350</width>
            <height>10</height>
            <textureFocus>-</textureFocus>
            <textureNoFocus>-</textureNoFocus>
          </control>
          <control Style="HiddenMenuItems">
            <description>IMDB</description>
            <type>button</type>
            <id>130</id>
            <hyperlink>4755</hyperlink>
            <hyperlinkParameter>site:IMDb Movie Trailers|search:#DetailTitle|return:Locked</hyperlinkParameter>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#ClickfinderPG.Translation.IMDB</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>14</ondown>
            <onup>11</onup>
            <visible>plugin.isenabled(OnlineVideos)</visible>
          </control>
     
          <control Style="HiddenMenuItems">
            <description>Hyperlink MP-TV Series or Mov Pic</description>
            <type>button</type>
            <id>14</id>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#DetailJumpToLabel</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>10</ondown>
            <onup>130</onup>
            <visible>[ [ !string.equals(#DetailSeriesID,0)+plugin.isenabled(MP-TV Series) ] | [ !string.equals(#DetailMovPicID,0)+plugin.isenabled(Moving Pictures) ] ]</visible>
          </control>
     
          <control Style="HiddenMenuItems">
            <description>Back</description>
            <type>button</type>
            <id>10</id>
            <textureFocus>button-focus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <width>350</width>
            <height>44</height>
            <textXOff>66</textXOff>
            <textYOff>2</textYOff>
            <label>#ClickfinderPG.Translation.Back</label>
            <onright>30</onright>
            <onleft>2</onleft>
            <ondown>12</ondown>
            <onup>14</onup>
            <visible></visible>
          </control>
        </control>
    View attachment 108325View attachment 108326

    Steps to Reproduce:
    Make a StackLayout with different height elements in it, conditionally hide the top most item, yPos will be garbled.
     

    Attachments

    • Screen OK Layout.png
      Screen OK Layout.png
      1.6 MB
    • Screen Not OK Layout.png
      Screen Not OK Layout.png
      1.7 MB
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    I have not tried yet, I would expect it to, but will see - will take a little, though.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Is gone in 1.3alpha. Good question, even better answer.
     

    Users who are viewing this thread

    Top Bottom