mirror of https://github.com/BOINC/boinc.git
MGR: If CSkinIcon PNG file has an alpha channel, use it as mask and ignore any <transparency_mask> tag
svn path=/trunk/boinc/; revision=24779
This commit is contained in:
parent
20ec2b2ac4
commit
6698ccee24
|
@ -9006,3 +9006,10 @@ Rom 12 Dec 2011
|
|||
win_build/installerv2/redist/Windows/x64/
|
||||
boinccas.dll
|
||||
boinccas95.dll
|
||||
|
||||
Charlie 7 Dec 2011
|
||||
- MGR: If CSkinIcon PNG file has an alpha channel, use it as mask and
|
||||
ignore any <transparency_mask> tag.
|
||||
|
||||
clientgui/
|
||||
SkinManager.cpp
|
||||
|
|
|
@ -238,8 +238,10 @@ bool CSkinIcon::Validate() {
|
|||
if (!m_icoIcon.Ok()) {
|
||||
if (!m_strDesiredIcon.IsEmpty()) {
|
||||
// Configure bitmap object with optional transparency mask
|
||||
wxBitmap bmp = wxBitmap(wxImage(m_strDesiredIcon, wxBITMAP_TYPE_ANY));
|
||||
if (!m_strDesiredTransparencyMask.IsEmpty()) {
|
||||
wxImage img = wxImage(m_strDesiredIcon, wxBITMAP_TYPE_ANY);
|
||||
wxBitmap bmp = wxBitmap(img);
|
||||
// If PNG file has alpha channel use it as mask & ignore <transparency_mask> tag
|
||||
if (!(m_strDesiredTransparencyMask.IsEmpty() || img.HasAlpha())) {
|
||||
bmp.SetMask(new wxMask(bmp, ParseColor(m_strDesiredTransparencyMask)));
|
||||
}
|
||||
// Now set the icon object using the newly created bitmap with optional transparency mask
|
||||
|
|
Loading…
Reference in New Issue