Index: src/plugin/PluginClass.cpp |
=================================================================== |
--- a/src/plugin/PluginClass.cpp |
+++ b/src/plugin/PluginClass.cpp |
@@ -44,6 +44,8 @@ |
HICON CPluginClass::s_hIcons[ICON_MAX] = { NULL, NULL, NULL }; |
DWORD CPluginClass::s_hIconTypes[ICON_MAX] = { IDI_ICON_DISABLED, IDI_ICON_ENABLED, IDI_ICON_DEACTIVATED }; |
+uint32_t iconHeight = 32; |
+uint32_t iconWidth = 32; |
Eric
2015/02/03 16:07:48
At the very least, it's time to introduce an anony
|
CPluginMimeFilterClient* CPluginClass::s_mimeFilter = NULL; |
@@ -992,10 +994,19 @@ |
if (rcStatusBar.Height() > 0) |
{ |
+ if (rcStatusBar.Height() < iconWidth) |
+ { |
+ iconWidth = 19; |
+ iconHeight = 19; |
+ CPluginClass::s_hIconTypes[0] = IDI_ICON_DISABLED_19; |
+ CPluginClass::s_hIconTypes[1] = IDI_ICON_ENABLED_19; |
+ CPluginClass::s_hIconTypes[2] = IDI_ICON_DEACTIVATED_19; |
+ } |
+ |
#ifdef _DEBUG |
m_nPaneWidth = 70; |
#else |
- m_nPaneWidth = min(rcStatusBar.Height(), 32); |
+ m_nPaneWidth = min(rcStatusBar.Height(), iconWidth); |
#endif |
} |
else |
@@ -1003,7 +1014,7 @@ |
#ifdef _DEBUG |
m_nPaneWidth = 70; |
#else |
- m_nPaneWidth = 32; |
+ m_nPaneWidth = iconWidth; |
#endif |
} |
// Create pane window |
@@ -1012,7 +1023,7 @@ |
MAKEINTATOM(GetAtomPaneClass()), |
L"", |
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, |
- rcStatusBar.Width() - 500,0,m_nPaneWidth,rcStatusBar.Height(), |
+ rcStatusBar.Width() - 500, 0, m_nPaneWidth, rcStatusBar.Height(), |
hWndStatusBar, |
(HMENU)3671, |
_Module.m_hInst, |
@@ -1621,8 +1632,11 @@ |
int offx = nDrawEdge; |
if (hIcon) |
{ |
- ::DrawIconEx(hDC, offx, 0, hIcon, rcClient.Height() - 2, rcClient.Height() - 2, NULL, NULL, DI_NORMAL); |
- offx += 32; |
+ //Get the RECT for the leftmost pane (the status text pane) |
+ RECT rect; |
+ BOOL rectRes = ::SendMessage(pClass->m_hStatusBarWnd, SB_GETRECT, 0, (LPARAM)&rect); |
+ ::DrawIconEx(hDC, 0, rect.bottom - rect.top - iconHeight, hIcon, iconWidth, iconHeight, NULL, NULL, DI_NORMAL); |
+ offx += iconWidth; |
} |
#ifdef _DEBUG |
// Display version |