<wrapmultiline> logic?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ronie Online
Team-XBMC Member
Posts: 8,254
Joined: Jan 2009
Reputation: 108
Post: #1
i'm using this code to wrap long labels onto two lines:
Code:
<control type="label">
    <posx>448</posx>
    <posy>80</posy>
    <width>490</width>
    <height>88</height>
    <label>$INFO[ListItem.Label]</label>
    <font>font-44c</font>
    <aligny>top</aligny>
    <wrapmultiline>true</wrapmultiline>
</control>

the height value is set correctly for allowing exactly two lines.

while this works fine in most cases, there are a few exceptions....

'Pirates of the Caribbean: The Curse of the Black Pearl'
is correctly wrapped onto two lines:

[Image: wrap1.jpg]


but 'Pirates of the Caribbean: Dead Man's Chest'
gets incorrectly wrapped onto three lines:

[Image: wrap2.jpg]


by examining the exceptions, it looks like xbmc thinks,
hey...if there's only one more word to go at the end of the second line,
i'm gonna use three lines anyway....

...and if there's two or more words left, i'll stick with two lines.



should i create a ticket for this, or learn to live with it?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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.
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #2
What benefit does wrapmultiline have over a textbox? As I always use a textbox in these situations...

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
ronie Online
Team-XBMC Member
Posts: 8,254
Joined: Jan 2009
Reputation: 108
Post: #3
textboxes have one disadvantage imo.
if the skin offers multiple fontsets, you can make your textbox perfectly sized for the default font,
but if you switch to the alternate font, you most likely end up with your textbox looking like this:

[Image: textbox-1.jpg]

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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.
(This post was last modified: 2010-12-12 19:40 by ronie.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #4
Try reducing the 88 until it doesn't do 3 lines. What number do you get?

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: badge.gif]
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,927
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #5
jmarshall Wrote:Try reducing the 88 until it doesn't do 3 lines. What number do you get?
That's what I did in the past. Wink

Does the line spacing affect this?

[Image: sig_zps3af3b48e.jpg]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #6
Could do, yeah. The other thing might be that the font height of 44 may not actually mean much in pixels at 720p - it may be more or less than that.

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: badge.gif]
find quote
ronie Online
Team-XBMC Member
Posts: 8,254
Joined: Jan 2009
Reputation: 108
Post: #7
jmarshall Wrote:Try reducing the 88 until it doesn't do 3 lines. What number do you get?

61.
at this point it won't do 3 lines anymore,
but it'll drop back to 1 line for all of them.

setting height to 62 results in the issue as stated above.

this is coded at 1080i...if it matters.
though trying it in 720p, different skin, different font produces the same issue.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or 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.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #8
A potential fix has been posted in #11016.

Cheers,
Jonathan

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: badge.gif]
find quote