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
MediaPortal 1 Skins
Alpha Bug in GUIThumbnailPanel?
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="Kurtis" data-source="post: 170720" data-attributes="member: 49627"><p>So, in RenderItem in GUIThumbnailPanel the following code:</p><p></p><p>[CODE] long dwColor = _textColor;</p><p> if (pItem.Selected) dwColor = _selectedColor;</p><p> if (pItem.IsPlayed) dwColor = _playedColor;</p><p> if (!bFocus && Focus) dwColor = Color.FromArgb(_unfocusedAlpha, Color.FromArgb((int)dwColor)).ToArgb();[/CODE]</p><p></p><p>seems to set the color for the text to be drawn under the thumbnail. The problem is that the way it is currently written, unfocusedAlpha completely overwrites the alpha channel of the text color, where what I think is probably intended in a blend. If (for instance) somebody wanted to make the text completely transparent, they would have to also set unfocusedAlpha to 0x00, which would result in the entire non-focused item becoming transparent, right?</p><p></p><p>The fix, I think, is to scale the alpha channel in question, something like:</p><p></p><p>[CODE] long dwColor = _textColor;</p><p> if (pItem.Selected) dwColor = _selectedColor;</p><p> if (pItem.IsPlayed) dwColor = _playedColor;</p><p> if (!bFocus && Focus)</p><p> {</p><p> Color c = Color.FromArgb((int)dwColor);</p><p> dwColor = Color.FromArgb(c.A * _unfocusedAlpha, c.R, c.G, c.B).ToArgb();</p><p> }[/CODE]</p><p></p><p>That lets me set my text to transparent if I want, though it now requires an integer multiplication.</p></blockquote><p></p>
[QUOTE="Kurtis, post: 170720, member: 49627"] So, in RenderItem in GUIThumbnailPanel the following code: [CODE] long dwColor = _textColor; if (pItem.Selected) dwColor = _selectedColor; if (pItem.IsPlayed) dwColor = _playedColor; if (!bFocus && Focus) dwColor = Color.FromArgb(_unfocusedAlpha, Color.FromArgb((int)dwColor)).ToArgb();[/CODE] seems to set the color for the text to be drawn under the thumbnail. The problem is that the way it is currently written, unfocusedAlpha completely overwrites the alpha channel of the text color, where what I think is probably intended in a blend. If (for instance) somebody wanted to make the text completely transparent, they would have to also set unfocusedAlpha to 0x00, which would result in the entire non-focused item becoming transparent, right? The fix, I think, is to scale the alpha channel in question, something like: [CODE] long dwColor = _textColor; if (pItem.Selected) dwColor = _selectedColor; if (pItem.IsPlayed) dwColor = _playedColor; if (!bFocus && Focus) { Color c = Color.FromArgb((int)dwColor); dwColor = Color.FromArgb(c.A * _unfocusedAlpha, c.R, c.G, c.B).ToArgb(); }[/CODE] That lets me set my text to transparent if I want, though it now requires an integer multiplication. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Skins
Alpha Bug in GUIThumbnailPanel?
Contact us
RSS
Top
Bottom