Auto-size height for labels?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Sranshaft Offline
Posting Freak
Posts: 1,427
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #1
We have auto-sizing width for labels which really comes in handy for a horizontal grouplist full of labels.

Is there any chance we could get the same thing for the label's height when dealing with labels in a vertical grouplist?

[Image: all-thin-fanart.jpg]
(This post was last modified: 2012-03-13 01:36 by Sranshaft.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #2
umm don't they all just use a standard font anyway ? what would be the point since the font it uses would never change height
find quote
Sranshaft Offline
Posting Freak
Posts: 1,427
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #3
The point would be in the case where the label's <wrapmultiline> is set to true. When I said vertical grouplists in the OP I wasn't referring to the context menu or the like. I'm referring to user created grouplists such as a grouplist filled with the details of a movie for example.

Having an autosize for height would take into account labels that are wider than the grouplist and, if <wrapmultiline> is set to true, automatically adjust the height to accommodate the extra line. At the moment, those label would either end up having to scroll or the code would have to take into account a possible 2nd line leaving an extra space - both look ugly in my opinion.

[Image: all-thin-fanart.jpg]
(This post was last modified: 2012-03-13 06:08 by Sranshaft.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #4
right now I get you yeah that could be useful for multiline labels or textboxes
find quote
Sranshaft Offline
Posting Freak
Posts: 1,427
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #5
I noticed Boxee seems to have this in place so it may be as simple as C&P depending on far their code has diverged from XBMC's code.

[Image: all-thin-fanart.jpg]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #6
Heh, in this case you may in fact be correct. For the budding coder, check the GetHeight() function here (and the other functions required for m_minHeight) https://github.com/bartsidee/boxee/blob/...ontrol.cpp

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