Learning To Skining First problem

pht-skin-dev

#1
hi everyone.
I'm learning to skinning and i have my first problem, i don't understand this behavior:
I create a background for my label and the label himself all two with the same dimension and position, if align the label to left i have what i aspect, instead if align the label to center i have a strange behavior and the label is not in the center of background image.
Attach some photos to better explain.
 
Align Left Result
![post-18030-0-42647500-1408978070.png|410x500](upload://pHhPd0qLSffqnKmbC6ZmakWF72U.png)
 
Align Center Result
![post-18030-0-93436700-1408978050.png|372x500](upload://dZLu2k9IkoBWtOwVQFYxYvCJWB4.png)
 
My Code
I post all Wraplist quote but the label and background is in FocusLayout line 543
    
      Conditional
      VisibleFadeEffectDelayShelf
      600
      378
      1368
      358
      300
      300
      4
      4
      horizontal
      0
      11001
      300
      11000
      300
      300
      300
  <itemlayout height="358" width="253">
    <control type="group" description="movie">
      <visible>ListItem.Type(movie)</visible>
      
      <control type="image" >
        <posx>21</posx>
        <posy>21</posy>
        <width>189</width>
        <height>285</height>
        <bordersize>-12</bordersize>
    <bordersize>-14</bordersize>
	    <texture>thumbs/PosterBG_NF.png</texture>          
      </control>
      
      <control type="image">
        <posx>21</posx>
        <posy>21</posy>
        <width>189</width>
        <height>285</height>
    <texture background="true" diffuse="thumbs/PosterDiffuse.png">$INFO[ListItem.Art(thumb)]</texture>
    <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>          
  </control>
      
      <control type="image">
        <posx>177</posx>
        <posy>273</posy>
        <width>33</width>
        <height>33</height>
        <texture>OverlayInProgress.png</texture>
      </control>
     
    </control>
    <control type="group" description="episodes">
      <visible>ListItem.Type(episode) | ListItem.Type(season)</visible>
       <control type="image">
        <posx>0</posx>
        <posy>0</posy>
        <width>208</width>
        <height>303</height>
    <aspectratio>scale</aspectratio>
    <texture>Mu_Home/Mu_Poster_BG.png</texture>          
  </control>
	  
      <control type="image">
        <posx>4</posx>
        <posy>4</posy>
        <width>200</width>
        <height>295</height>
        <texture background="true">$INFO[ListItem.GrandparentThumb]</texture>
        <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>
      </control>
      
      <control type="group">           
       <control type="image">
        <posx>4</posx>
        <posy>230</posy>
        <width>200</width>
        <height>70</height>
    <aspectratio>scale</aspectratio>
    <texture>Mu_Home/Mu_Label_BG.png</texture>          
   </control>
	   
   <control type="label">
          <posx>4</posx>
          <posy>230</posy>
          <width>200</width>
          <height>70</height>
          <font>Mu_Poster_TXT</font>
          <align>left</align>
          <textcolor>White</textcolor>
          <label>$LOCALIZE[31973]$INFO[ListItem.Season] $LOCALIZE[31977]$INFO[ListItem.Episode]</label>
        </control>
      </control>
    </control>
  </itemlayout>
  
  <focusedlayout height="358" width="253">
    <control type="group" description="movie">
      <visible>ListItem.Type(movie)</visible>
      <control type="image">
        <posx>21</posx>
        <posy>21</posy>
        <width>189</width>
        <height>285</height>
        <bordersize>-12</bordersize>
        <include>PosterThumbFO</include>
      </control>
      <control type="image">
        <posx>21</posx>
        <posy>21</posy>
        <width>189</width>
        <height>285</height>
        <include>PosterThumb</include>
      </control>
      <control type="image">
        <posx>177</posx>
        <posy>273</posy>
        <width>33</width>
        <height>33</height>
        <texture>OverlayInProgress.png</texture>
      </control>
    </control>
    <control type="group" description="episodes">
      <visible>ListItem.Type(episode) | ListItem.Type(season)</visible>  
       <control type="image">
        <posx>25</posx>
        <posy>0</posy>
        <width>253</width>
        <height>358</height>
    <aspectratio>scale</aspectratio>
   <texture>Mu_Home/Mu_Poster_BG.png</texture>          
  </control>
	  
      <control type="image">
        <posx>29</posx>
        <posy>4</posy>
        <width>245</width>
        <height>350</height>
        <texture background="true">$INFO[ListItem.GrandparentThumb]</texture>
        <aspectratio aligny="top" scalediffuse="false">scale</aspectratio>
      </control>
      
      <control type="group" description="Label">
       <posx>29</posx>
   <posy>239</posy>
       <control type="image">
       <width>245</width>
       <height>115</height>
   <aspectratio>stretch</aspectratio>
   <texture>Mu_Home/Mu_Label_BG.png</texture>          
      </control>
	   
  <control type="label">
        <width>245</width>
        <height>115</height>
        <font>Mu_Poster_TXT</font>
        <align>left</align>
        <aligny>center</aligny>
        <textcolor>White</textcolor>
        <label>$LOCALIZE[31973]$INFO[ListItem.Season] $LOCALIZE[31977]$INFO[ListItem.Episode]</label>
       </control>
      
      </control>
    
    </control>
  </focusedlayout>
</control>
 
Anyone can explain where i'm wrong?
 
Thank a lot and sorry for bad English.

#2

Hi,

It is because of your fixed position of label. When you use left align it will start left from that position. Using center it will center on that fixed position (e.g. 4 characters will give you 2 characters left and 2 characters right from the fixed position.). I would suggest you to make use of an cell in the code, this will allow you to align it correctly.