home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
Improvement Suggestions
Improvement in listcontrol for textOffsetY2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="pilehave" data-source="post: 346840" data-attributes="member: 71550"><p>Hi!</p><p></p><p>At the moment a MediaPortal listcontrol will make the text in the listcontrol as wide as the listcontrol, if the textYOff/textYOff2/textYOff3 is not the same.</p><p></p><p>This is to make multi-line lists available, and it works fine that way.</p><p></p><p>Where it doesn't work fine, is when you want different textYOff/textYOff2/textYOff3 values, if you for example are using different fonts (with different height).</p><p></p><p>Here, you don't want multiline, but if you try to adjust the textYOff/textYOff2/textYOff3 values, the texts will overlap (a long line in text1 will scroll over text2).</p><p></p><p>The "offending" code is in "GUIListControl.cs" around and after line 556. Here an comparison is made:</p><p></p><p>[CODE]if ((_text2Visible && pItem.Label2.Length > 0) && (_textOffsetY == _textOffsetY2))[/CODE]</p><p></p><p>As stated before, this is fine if your purpose in setting different values is to make the listelement divided in one or more lines, but is a problem if you're trying to adjust for different font-heights.</p><p></p><p><strong>My suggestion is to:</strong></p><p></p><p>- Introduce a new XML-property into listcontrol (and this will probably affect a few others like playlistcontrol, up/down control etc.) called something like "multiLine". Setting this to "yes" will make the script work as before (allowing multilines) and setting it to "no" will free your inner skinner and allow for free positioning in the listelement.</p><p></p><p>I have allready compiled my own version of a similar fix and hardcoded this in the script:</p><p></p><p>[CODE] int diffOffsetY2 = Math.Abs(_textOffsetY - _textOffsetY2);</p><p> if (((_text2Visible && pItem.Label2.Length > 0) && (_textOffsetY == _textOffsetY2)) || (diffOffsetY2 < 5))[/CODE]</p><p></p><p>This approach is a bit different, but allows for a 4 pixel adjustment of the Y-offset of the second element (up or down).</p><p></p><p>One would probably not adjust 4 pixel up/down if the text is meant to be on different lines, but this is just my interpretation of the reality <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p>Hope to get some input!</p></blockquote><p></p>
[QUOTE="pilehave, post: 346840, member: 71550"] Hi! At the moment a MediaPortal listcontrol will make the text in the listcontrol as wide as the listcontrol, if the textYOff/textYOff2/textYOff3 is not the same. This is to make multi-line lists available, and it works fine that way. Where it doesn't work fine, is when you want different textYOff/textYOff2/textYOff3 values, if you for example are using different fonts (with different height). Here, you don't want multiline, but if you try to adjust the textYOff/textYOff2/textYOff3 values, the texts will overlap (a long line in text1 will scroll over text2). The "offending" code is in "GUIListControl.cs" around and after line 556. Here an comparison is made: [CODE]if ((_text2Visible && pItem.Label2.Length > 0) && (_textOffsetY == _textOffsetY2))[/CODE] As stated before, this is fine if your purpose in setting different values is to make the listelement divided in one or more lines, but is a problem if you're trying to adjust for different font-heights. [B]My suggestion is to:[/B] - Introduce a new XML-property into listcontrol (and this will probably affect a few others like playlistcontrol, up/down control etc.) called something like "multiLine". Setting this to "yes" will make the script work as before (allowing multilines) and setting it to "no" will free your inner skinner and allow for free positioning in the listelement. I have allready compiled my own version of a similar fix and hardcoded this in the script: [CODE] int diffOffsetY2 = Math.Abs(_textOffsetY - _textOffsetY2); if (((_text2Visible && pItem.Label2.Length > 0) && (_textOffsetY == _textOffsetY2)) || (diffOffsetY2 < 5))[/CODE] This approach is a bit different, but allows for a 4 pixel adjustment of the Y-offset of the second element (up or down). One would probably not adjust 4 pixel up/down if the text is meant to be on different lines, but this is just my interpretation of the reality ;) Hope to get some input! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Improvement in listcontrol for textOffsetY2
Contact us
RSS
Top
Bottom