[Help] Label Distribution Issue
#1
Hey guys, pretty new to skinning and just learning by messing around with the foundation skin at the moment.

I seem to have come to a bit of a hitch - essentially what i'm aiming for is a horizontal static list but at the moment the "favourites" label doesn't have the right spacing between it like the others do.
I've searched through the Online Skinning manuals for an answer to my problem but all examples on there are for Vertical Orientation and they don't seem to translate. I just don't understand why my labels aren't distributing evenly.
Its probably something simple but I can't see it, so if anyone can show me what i'm doing wrong.

Cheers

Heres a Screenshot of whats going on
Image


Code:
        <control type="list" id="300">
            <description>Home List</description>
            <posx>-200</posx>
            <posy>320</posy>
            <width>1600</width>
            <height>50</height>
            <onup>300</onup>
            <ondown>300</ondown>
            <onleft>300</onleft>
            <onright>300</onright>
            <orientation>horizontal</orientation>
            <focusposition>0</focusposition>
            <scrolltime>200</scrolltime>

            <itemlayout width="120" height="50">

                <control type="label">
                    <posx>340</posx>
                    <height>50</height>
                    <width min="60" max="120">auto</width>
                    <font>Small</font>
                    <label>$INFO[ListItem.Label]</label>
                    <align>center</align>
                    <label>$INFO[ListItem.Label]</label>
                    
                
                </control>

            </itemlayout>

            <focusedlayout width="120" height="50">

                <control type="label">
                    <posx>340</posx>
                    <width min="60" max="120">auto</width>
                    <height>50</height>
                    <info>ListItem.Label</info>
                    <font>Home</font>
                    <textcolor>Yellow</textcolor>
                    <align>center</align>
                    <label>$INFO[ListItem.Label]</label>
                </control>

            </focusedlayout>
Reply
#2
Seems OK to me but I may be missing the point (this happens to me often).

I would add 1px frame image w=120 h=50 to that list so that you can better see what's going on.

Question, though - why do you use posx=340 for labels when you have list item width=120 ?
My skins:

Amber
Quartz

Reply
#3
As the code says: every items width is 120, no matter how much text the label has.
So the same "problem" occurs with all the labels and is easy see with the "favourites" because its the longest word.
With grouplist control and buttons you could select own width for every item, but it might cause other issues atleast if you change language and the words change.
Reply
#4
Autosized labels are supported in grouplists only. You can't have the same space between labels in a list control.
Image
Reply
#5
Thanks for the info guys,

pecinko - Well i've altered the code a bit now - turns out the list control was pushing it one way -200 and I was pushing the labels the other way to get them to sit dead center, or thereabouts.
If removed the Posx tag in the "list" control but to get the list to sit in the center of the screen I'm having to set the labels "posx" value to 160 still - it doesn't seem to affect the labels width or anything.. just where they're sitting on screen.

m_K_o - yeah i had a funny feeling thats what was going on... hmm thanks for the heads up about cons of using a grouplist, i will keep that in mind.

'Black - I see, Ive tried replacing "list" with "grouplist" but when i do all the labes disappear on refresh ?? - Am I missing something or is it used differently to list, wrap list, fixed lists ? The info in the skinning manual is a little vague.


Reply
#6
The grouplist is like a controlgroup that forces it's content into a list. It's completely differently laid out in the XML from containers (list/panel etc.)

Please let us know if you have a better example for the skinning manual (or even better, fix it yourself).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
(2012-03-17, 03:01)zedika Wrote: Thanks for the info guys,

pecinko - Well i've altered the code a bit now - turns out the list control was pushing it one way -200 and I was pushing the labels the other way to get them to sit dead center, or thereabouts.
If removed the Posx tag in the "list" control but to get the list to sit in the center of the screen I'm having to set the labels "posx" value to 160 still - it doesn't seem to affect the labels width or anything.. just where they're sitting on screen.

Well in fact it was you as you have posx=-200 for list Smile

For 720 skin that uses 1280 screen canvas, start with

PHP Code:
<control type="list" id="300">
            <
description>Home List</description>
            <
posx>0</posx>
            <
posy>320</posy>
            <
width>1280</width>
            <
height>50</height

with items width 160 (1280/8)

and afterwards you can try with

PHP Code:
<control type="list" id="300">
            <
description>Home List</description>
            <
posx>-80</posx>
            <
posy>320</posy>
            <
width>1440</width>
            <
height>50</height

just to get the feeling about how things function.

For center aligned labels in list, posx defined middle position i.e. center of that label, thus:

PHP Code:
<itemlayout width="160" height="50">

                <
control type="label">
                    <
posx>80</posx>
                    <
width>160</width>
                     <
height>50</height>
                    <
font>Small</font>
                    <
align>center</align>
                    <
label>$INFO[ListItem.Label]</label
My skins:

Amber
Quartz

Reply
#8
Quote:For center aligned labels in list, posx defined middle position i.e. center of that label, thus:

PHP Code:
<itemlayout width="160" height="50">

                <
control type="label">
                    <
posx>80</posx>
                    <
width>160</width>
                     <
height>50</height>
                    <
font>Small</font>
                    <
align>center</align>
                    <
label>$INFO[ListItem.Label]</label

It seems that when using posx inside the <itemlayout> and <focusedlayout> tag it essentially positions those layouts only [width + height] on the screen not the list items themselves.
But thanks for your help pecinko I'm learning it slowly but surely Wink


Can anyone show me or explain to me how to use the grouplist control I'm sort of lost on how/where to use it ??
Reply

Logout Mark Read Team Forum Stats Members Help
[Help] Label Distribution Issue0