MGR: If the desired icon size is missing use the next higher or lower one that is available.

This commit is contained in:
Rom Walton 2014-02-14 16:18:18 -05:00
parent 95a45dee5a
commit da3ac5c72a
1 changed files with 6 additions and 6 deletions

View File

@ -88,9 +88,9 @@ CTaskBarIcon::CTaskBarIcon(wxString title, wxIconBundle* icon, wxIconBundle* ico
#endif
{
wxSize size = wxSize(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X), wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y));
m_iconTaskBarNormal = icon->GetIcon(size);
m_iconTaskBarDisconnected = iconDisconnected->GetIcon(size);
m_iconTaskBarSnooze = iconSnooze->GetIcon(size);
m_iconTaskBarNormal = icon->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
m_iconTaskBarDisconnected = iconDisconnected->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
m_iconTaskBarSnooze = iconSnooze->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
m_SnoozeGPUMenuItem = NULL;
m_bTaskbarInitiatedShutdown = false;
@ -351,9 +351,9 @@ void CTaskBarIcon::OnReloadSkin(CTaskbarEvent& WXUNUSED(event)) {
wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
wxSize size = wxSize(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X), wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y));
m_iconTaskBarNormal = pSkinAdvanced->GetApplicationIcon()->GetIcon(size);
m_iconTaskBarDisconnected = pSkinAdvanced->GetApplicationDisconnectedIcon()->GetIcon(size);
m_iconTaskBarSnooze = pSkinAdvanced->GetApplicationSnoozeIcon()->GetIcon(size);
m_iconTaskBarNormal = pSkinAdvanced->GetApplicationIcon()->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
m_iconTaskBarDisconnected = pSkinAdvanced->GetApplicationDisconnectedIcon()->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
m_iconTaskBarSnooze = pSkinAdvanced->GetApplicationSnoozeIcon()->GetIcon(size, wxIconBundle::FALLBACK_NEAREST_LARGER);
}