diff --git a/checkin_notes b/checkin_notes index 8013db04a5..873c3017eb 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 tag. + + clientgui/ + SkinManager.cpp diff --git a/clientgui/SkinManager.cpp b/clientgui/SkinManager.cpp index 5e29c56d60..59da0fca3b 100644 --- a/clientgui/SkinManager.cpp +++ b/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 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