Kodi Community Forum

Full Version: skinning: conditonal list dimensions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I guess this could go in skin development as well, please move if that is more appropriate.

One thing I would really like is to have the various containers be resizable. This would allow more flexibility and saving screen real estate.
An explanation: it's of course nice to have a media overlay in all your windows showing info with an album cover or mini video window. It does however also use space in your layout even when you are not playing anything. You can then either leave that space unused, making it look out of place or fill it up with things just for the sake of filling it up, having a negative effect in overall cleanness and consistency.

Now if it would be possible to determine the size of filelists based upon a condition like video or music playing, this would be no issue.

So for example
Code:
<include name="ListView">
    <control type="list" id="50">
        <height condition="Player.HasAudio">500</height>
                ...
                <height condition="!Player.HasAudio">800</height>

I tried creating two versions of a listview and using visibility conditions, which works but when you have a listing on screen and you stop playback there would be no list at all. Which makes sense, but I thought I'd try anyway Wink

I suspect something like this would be hard to do and would require big changes, but I felt like just putting it out there, maybe I'm wrong or someone has a different idea Smile I assume the problem is that the listview isn't updated every second of course. Maybe changing playback state could send a signal to the list to update itself?

Anyway, no biggie if it isn't possible or wanted, but I think it would be very nice if feasible.
You have visibility conditions on the itemlayout that you can use. Combined with a conditional slide to alter the position of the origin you should have all you need I think?
How would I go about that? I tried something like that earlier but I must be doing something wrong then.
Something like this?

Code:
<include name="ListViewNoPlayback">
    <control type="list" id="50">
               <height>800</height>
        <visible>!Player.HasAudio</visible>
                <animation effect="slide" start="0,100" end="0,0" Condition="!Player.HasAudio" time="100">Conditional</animation>

Code:
<include name="ListViewPlayback">
    <control type="list" id="50">
               <height>500</height>
        <visible>Player.HasAudio</visible>
                <animation effect="slide" start="0,100" end="0,0" time="100" Condition="Player.HasAudio">Conditional</animation>

Then I run into the same problem of having no list at all when stopping playback. But I'm probably overlooking something and I feel a doh! moment coming up Big Grin

edit: I thought I had it, but no. I realized that you meant two seperate itemlayouts and not two seperate lists like I described, but you can only set the dimensions of the entries right?
Yes, use conditional layouts. You can thus alter their width with this.

You can alter the "origin" of the list via a slide animation.
Changing the width would indeed be no problem. Except I'm looking to resize it vertically Smile And just moving it vertically poses problem as part of the list would go off the screen/overlap other elements.
bump. any chance that this will get implemented?