This alignment is normal?
#1
I have tried my problem in an image make it understood.

I have a control from type list.
This list has 3 columns.
The first column contains the track number, the second the title, the third the duration.
I would like to center the track numbers in their area and arrange the duration in their area right.
Is unusual, if I set the alignment of the label with the track numbers to center, the numbers are not in the middle of their area, but also sit on the left, even over the range.
I need to change the values posx so that they enter the center of the area.

Image
Is it so intended?
I think elsewhere in the code that is not that way.

PHP Code:
<control type="list" id="50">
                <
viewtype label="List">list</viewtype>
                <
posx>20</posx>
                <
posy>10</posy>
                <
width>730</width>
                <
height>560</height>
                <
onleft>9000</onleft>
                <
onright>550</onright>
                <
onup>50</onup>
                <
ondown>50</ondown>
                <
scrolltime>200</scrolltime>
                <
pagecontrol>550</pagecontrol>
                <include>
Animation_ViewChange</include>
                
                <
itemlayout height="35" width="730">
                    <
control type="label">
                        <
posx>0</posx>
                        <
width>75</width>
                        <
height>35</height>
                        <
align>center</align>
                        <!--<
info>ListItem.TrackNumber</info>-->
                        <
label>$INFO
[ListItem.TrackNumber]</label>
                        <
textcolor>Color_ListTextUnFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>Window.IsActive(502) + Container.Content(songs)</visible>
                    </
control>
                    <
control type="label">
                        <
posx>95</posx>
                        <
width>480</width>
                        <
height>35</height>
                        <
info>ListItem.Title</info>
                        <
textcolor>Color_ListTextUnFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>Container.Content(songs) | Container.Content(episodes)</visible>
                    </
control>
                    <
control type="label">
                        <
posx>580</posx>
                        <
posy>0</posy>
                        <
width>150</width>
                        <
height>35</height>
                        <
align>right</align>
                        <
label>$INFO
[ListItem.Duration]</label>
                        <
textcolor>Color_ListTextUnFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>[Window.IsActive(25) + Container.Content(movies)] | Window.IsActive(502)</visible>
                    </
control>
                </
itemlayout>
                <
focusedlayout height="35" width="730">
                    <
control type="label">
                        <
posx>0</posx>
                        <
width>75</width>
                        <
height>35</height>
                        <
align>center</align>
                        <
info>ListItem.TrackNumber</info>
                        <
textcolor>Color_ListTextFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>Window.IsActive(502) + Container.Content(songs)</visible>
                    </
control>
                    <
control type="image">
                        <
posx>75</posx>
                        <
width>505</width>
                        <
height>35</height>
                        <
colordiffuse>Color_ListButtonFocused</colordiffuse>
                        <
texture>list/bg_focus.png</texture>
                        <
aspectratio scalediffuse="false">scale</aspectratio>
                    </
control>
                    <
control type="label">
                        <
posx>95</posx>
                        <
width>480</width>
                        <
height>35</height>
                        <
info>ListItem.Title</info>
                        <
textcolor>Color_ListTextFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>Container.Content(songs) | Container.Content(episodes)</visible>
                    </
control>
                    <
control type="label">
                        <
posx>580</posx>
                        <
width>150</width>
                        <
height>35</height>
                        <
label>$INFO
[ListItem.Duration]</label>
                        <
textcolor>Color_ListTextFocused</textcolor>
                        <
selectedcolor>Color_ListTextSelected</selectedcolor>
                        <
font>Font_ListButton</font>
                        <
scroll>false</scroll>
                        <
visible>[Window.IsActive(25) + Container.Content(movies)] | Window.IsActive(502)</visible>
                    </
control>
                </
focusedlayout>
            </
control
Reply
#2
I think there positioned where the posx starts so centred on that would centre the word on posx0 it doesn't offset auto automatically.
Reply
#3
Rocky5 Wrote:I think there positioned where the posx starts so centred on that would centre the word on posx0 it doesn't offset auto automatically.

I do believe that this is not always so
I think that sometimes it is the one with posx / posy and width / height indicates an area where the container is positioned and the text will be aligned in the container, the position of the containers is not changed.

in my example above seems to move the entire container, not just the text in the container
Reply
#4
Not sure I entirely understand your example, but I am aware that centering of text in some cases is non-intuitive. It's historical (i.e. it was there from the start, and I didn't want to break skins).

It should be consistent across all label controls though I think?
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
#5
jmarshall Wrote:Not sure I entirely understand your example, but I am aware that centering of text in some cases is non-intuitive. It's historical (i.e. it was there from the start, and I didn't want to break skins).


Hah, i just posted concerning this same issue last week. http://forum.xbmc.org/showthread.php?tid=57895 I agree that it is slightly non-intuitive, but it is easy enough to work with once you understand it. I think it would be great to add a image-driven explanation in the skinning guide in the wiki as it did take me a little while to figure out as its not in line with html tables.
Reply

Logout Mark Read Team Forum Stats Members Help
This alignment is normal?0