diff options
Diffstat (limited to 'plugins/HistoryStats/src')
-rw-r--r-- | plugins/HistoryStats/src/bandctrlimpl.cpp | 7 | ||||
-rw-r--r-- | plugins/HistoryStats/src/dlgoption_subexclude.cpp | 2 | ||||
-rw-r--r-- | plugins/HistoryStats/src/optionsctrlimpl.cpp | 2 | ||||
-rw-r--r-- | plugins/HistoryStats/src/utils.cpp | 14 | ||||
-rw-r--r-- | plugins/HistoryStats/src/utils.h | 4 |
5 files changed, 6 insertions, 23 deletions
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp index 2c8f0286d3..f0553dd4c6 100644 --- a/plugins/HistoryStats/src/bandctrlimpl.cpp +++ b/plugins/HistoryStats/src/bandctrlimpl.cpp @@ -491,7 +491,7 @@ int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton) DeleteObject(ii.hbmMask);
}
- m_hImageList = ImageList_Create(m_IconSize.cx, m_IconSize.cy, OS::imageListColor() | ILC_MASK, 5, 5);
+ m_hImageList = ImageList_Create(m_IconSize.cx, m_IconSize.cy, ILC_COLOR32 | ILC_MASK, 5, 5);
}
// insert icon into image list
@@ -501,9 +501,8 @@ int BandCtrlImpl::onBCMAddButton(BCBUTTON *pButton) HICON hIconDisabled = convertToGray(pButton->hIcon);
if (hIconDisabled) {
- if (!m_hImageListD) {
- m_hImageListD = ImageList_Create(m_IconSize.cx, m_IconSize.cy, OS::imageListColor() | ILC_MASK, 5, 5);
- }
+ if (!m_hImageListD)
+ m_hImageListD = ImageList_Create(m_IconSize.cx, m_IconSize.cy, ILC_COLOR32 | ILC_MASK, 5, 5);
id.nIconD = ImageList_AddIcon(m_hImageListD, hIconDisabled);
diff --git a/plugins/HistoryStats/src/dlgoption_subexclude.cpp b/plugins/HistoryStats/src/dlgoption_subexclude.cpp index 885cbb3d8a..6319c414e2 100644 --- a/plugins/HistoryStats/src/dlgoption_subexclude.cpp +++ b/plugins/HistoryStats/src/dlgoption_subexclude.cpp @@ -111,7 +111,7 @@ void DlgOption::SubExclude::onWMInitDialog() // init clist
HWND hCList = GetDlgItem(getHWnd(), IDC_CONTACTS);
- HIMAGELIST hIml = ImageList_Create(OS::smIconCX(), OS::smIconCY(), OS::imageListColor() | ILC_MASK, 2, 0);
+ HIMAGELIST hIml = ImageList_Create(OS::smIconCX(), OS::smIconCY(), ILC_COLOR32 | ILC_MASK, 2, 0);
SendMessage(hCList, CLM_SETEXTRAIMAGELIST, 0, reinterpret_cast<LPARAM>(hIml));
staticRecreateIcons(reinterpret_cast<LPARAM>(this));
diff --git a/plugins/HistoryStats/src/optionsctrlimpl.cpp b/plugins/HistoryStats/src/optionsctrlimpl.cpp index 1c6c0149a2..b9a7927f95 100644 --- a/plugins/HistoryStats/src/optionsctrlimpl.cpp +++ b/plugins/HistoryStats/src/optionsctrlimpl.cpp @@ -333,7 +333,7 @@ LRESULT CALLBACK OptionsCtrlImpl::staticTreeProc(HWND hTree, UINT msg, WPARAM wP void OptionsCtrlImpl::staticInitStateImages()
{
if (m_nStateIconsRef++ == 0 && !m_hStateIcons) {
- m_hStateIcons = ImageList_Create(OS::smIconCX(), OS::smIconCY(), OS::imageListColor() | ILC_MASK, 16, 0);
+ m_hStateIcons = ImageList_Create(OS::smIconCX(), OS::smIconCY(), ILC_COLOR32 | ILC_MASK, 16, 0);
staticUpdateStateImages(0);
IconLib::registerCallback(staticUpdateStateImages, 0);
diff --git a/plugins/HistoryStats/src/utils.cpp b/plugins/HistoryStats/src/utils.cpp index 4e0a78400b..a199caa059 100644 --- a/plugins/HistoryStats/src/utils.cpp +++ b/plugins/HistoryStats/src/utils.cpp @@ -936,22 +936,10 @@ const ext::string& utils::getProfileName() /*
* OS
*/
-OS::OS() : m_bIsXPPlus(false), m_ImageListColor(ILC_COLORDDB) // MEMO: maybe change this to ILC_COLOR{8,16,24}
+OS::OS()
{
m_SmIcon.cx = 16; // GetSystemMetrics(SM_CXSMICON);
m_SmIcon.cy = 16; // GetSystemMetrics(SM_CYSMICON);
-
- OSVERSIONINFO osvi = { 0 };
-
- osvi.dwOSVersionInfoSize = sizeof(osvi);
-
- if (GetVersionEx(&osvi)) {
- m_bIsXPPlus = ((osvi.dwMajorVersion == 5 && osvi.dwMinorVersion >= 1) || osvi.dwMajorVersion >= 6);
-
- if (m_bIsXPPlus) {
- m_ImageListColor = ILC_COLOR32;
- }
- }
}
OS OS::m_Data;
diff --git a/plugins/HistoryStats/src/utils.h b/plugins/HistoryStats/src/utils.h index daae031316..8b5f6c3d9d 100644 --- a/plugins/HistoryStats/src/utils.h +++ b/plugins/HistoryStats/src/utils.h @@ -112,8 +112,6 @@ class OS : private pattern::NotCopyable<OS>
{
private:
- bool m_bIsXPPlus;
- UINT m_ImageListColor;
SIZE m_SmIcon;
private:
@@ -123,8 +121,6 @@ private: static OS m_Data;
public:
- static bool isXPPlus() { return m_Data.m_bIsXPPlus; }
- static UINT imageListColor() { return m_Data.m_ImageListColor; }
static int smIconCX() { return m_Data.m_SmIcon.cx; }
static int smIconCY() { return m_Data.m_SmIcon.cy; }
};
|