summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-24 21:23:41 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-24 21:23:41 +0300
commit7d02f225d6d913330310694d1e408d963137f9ca (patch)
treeb2ae52bed216a9962cd24329fae38f8007cf4f1c /plugins/TabSRMM/src
parent35b2770647c4e96130d35733f9cac94f09d39843 (diff)
fixes #3685 (tabSRMM: выпилить оверлей "возможность включена")
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 86858c1328..7d1e8ceb35 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1094,38 +1094,32 @@ void CMsgDialog::DrawStatusIcons(HDC hDC, const RECT &rc, int gap)
int nIcon = 0;
while (StatusIconData *sid = Srmm_GetNthIcon(m_hContact, nIcon++)) {
+ bool bDrawOverlay = false;
+
if (!mir_strcmp(sid->szModule, MSG_ICON_MODULE)) {
if (sid->dwId == MSG_ICON_SOUND) {
DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS],
PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL);
- DrawIconEx(hDC, x, y, m_pContainer->cfg.flags.m_bNoSound ?
- PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled,
- PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL);
+ bDrawOverlay = m_pContainer->cfg.flags.m_bNoSound;
}
else if (sid->dwId == MSG_ICON_UTN) {
if (AllowTyping()) {
DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL);
- DrawIconEx(hDC, x, y, g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew) ?
- PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled, PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL);
+ bDrawOverlay = !g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew);
}
else CSkin::DrawDimmedIcon(hDC, x, y, PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING], 50);
}
}
else {
- HICON hIcon;
- if ((sid->flags & MBF_DISABLED) && sid->hIconDisabled)
- hIcon = sid->hIconDisabled;
- else
- hIcon = sid->hIcon;
-
- if ((sid->flags & MBF_DISABLED) && sid->hIconDisabled == nullptr)
- CSkin::DrawDimmedIcon(hDC, x, y, PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, hIcon, 50);
- else
- DrawIconEx(hDC, x, y, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
+ bDrawOverlay = (sid->flags & MBF_DISABLED) != 0;
+ DrawIconEx(hDC, x, y, sid->hIcon, 16, 16, 0, nullptr, DI_NORMAL);
}
+ if (bDrawOverlay)
+ DrawIconEx(hDC, x, y, PluginConfig.g_iconOverlayDisabled, PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL);
+
x += PluginConfig.m_smcxicon + gap;
}
}