diff options
-rw-r--r-- | include/m_chat_int.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/main.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 1 | ||||
-rw-r--r-- | src/modules/chat/chat_opts.cpp | 1 | ||||
-rw-r--r-- | src/modules/chat/log.cpp | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 4b8c95acfb..c61ae4ee0c 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -256,6 +256,7 @@ struct GlobalLogSettingsBase DWORD dwIconFlags;
DWORD dwTrayIconFlags;
DWORD dwPopupFlags;
+ int LogIconSize;
int LogTextIndent;
int LoggingLimit;
int iEventLimit;
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp index 08b0a877aa..d2523bd726 100644 --- a/plugins/TabSRMM/src/chat/main.cpp +++ b/plugins/TabSRMM/src/chat/main.cpp @@ -131,9 +131,6 @@ static void OnCreateModule(MODULEINFO *mi) static void OnLoadSettings()
{
- LOGFONT lf;
- char szBuf[40];
-
g_Settings.iEventLimitThreshold = db_get_w(NULL, "Chat", "LogLimitThreshold", 20);
g_Settings.dwIconFlags = M.GetDword("Chat", "IconFlags", 0x0000);
g_Settings.bOpenInDefault = M.GetBool("Chat", "DefaultContainer", true);
@@ -161,6 +158,8 @@ static void OnLoadSettings() replaceStrT(g_Settings.pszLogDir, M.getChatLogPath());
+ g_Settings.LogIconSize = (g_Settings.bScaleIcons) ? 10 : 16;
+
g_Settings.iSplitterY = db_get_w(NULL, "Chat", "splitY", 50);
if (g_Settings.iSplitterY <= 20)
g_Settings.iSplitterY = 50;
@@ -172,6 +171,7 @@ static void OnLoadSettings() DeleteObject(g_Settings.UserListFonts[CHAT_STATUS_OFFLINE]);
}
+ LOGFONT lf;
pci->LoadMsgDlgFont(18, &lf, NULL);
g_Settings.UserListFonts[CHAT_STATUS_NORMAL] = CreateFontIndirect(&lf);
@@ -186,6 +186,7 @@ static void OnLoadSettings() g_Settings.iNickListFontHeight = max(M.GetByte("Chat", "NicklistRowDist", 12), (ih > ih2 ? ih : ih2));
for (int i = 0; i < 7; i++) {
+ char szBuf[40];
mir_snprintf(szBuf, 20, "NickColor%d", i);
g_Settings.nickColors[i] = M.GetDword("Chat", szBuf, g_Settings.UserListColors[0]);
}
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 3527fd69ef..2ef1c550c1 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -545,6 +545,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM SaveBranch(GetDlgItem(hwndDlg, IDC_CHECKBOXES), branch2, SIZEOF(branch2));
pci->ReloadSettings();
+ pci->MM_IconsChanged();
pci->MM_FontsChanged();
Log_SetStyles();
pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp index e95ac3d5e7..3cdb866171 100644 --- a/src/modules/chat/chat_opts.cpp +++ b/src/modules/chat/chat_opts.cpp @@ -195,6 +195,7 @@ static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault) void LoadGlobalSettings(void)
{
+ g_Settings->LogIconSize = 10;
g_Settings->bLogLimitNames = db_get_b(NULL, "Chat", "LogLimitNames", 1) != 0;
g_Settings->bShowTime = db_get_b(NULL, "Chat", "ShowTimeStamp", 1) != 0;
g_Settings->bSoundsFocus = db_get_b(NULL, "Chat", "SoundsFocus", 0) != 0;
diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp index 26a88b35f3..b5703cda2e 100644 --- a/src/modules/chat/log.cpp +++ b/src/modules/chat/log.cpp @@ -483,9 +483,8 @@ void LoadMsgLogBitmaps(void) bih.biSize = sizeof(bih);
bih.biBitCount = 24;
bih.biCompression = BI_RGB;
- bih.biHeight = 10; //GetSystemMetrics(SM_CYSMICON);
+ bih.biHeight = bih.biWidth = g_Settings->LogIconSize;
bih.biPlanes = 1;
- bih.biWidth = 10; //GetSystemMetrics(SM_CXSMICON);
int widthBytes = ((bih.biWidth * bih.biBitCount + 31) >> 5) * 4;
RECT rc;
|