diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-22 21:59:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-22 21:59:08 +0300 |
commit | a53e822aec3f226b73989044ddb7a35daa212b4a (patch) | |
tree | 1d7cb6f9c7a4c376e8bf5cb57d5804e001cd75a7 /src/core | |
parent | 644654ce3a5fef70e07a59dd8e8ee69448829175 (diff) |
fixes #3106 (ancient evil with font settings in StdMsg)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 13 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 3 |
3 files changed, 1 insertions, 24 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 4ee8d5be72..3add13cfd6 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -110,13 +110,6 @@ static BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) static void OnLoadSettings() { - if (g_Settings.MessageAreaFont) - DeleteObject(g_Settings.MessageAreaFont); - - LOGFONT lf; - g_chatApi.LoadMsgDlgFont(17, &lf, &g_Settings.MessageAreaColor); - g_Settings.MessageAreaFont = CreateFontIndirect(&lf); - g_Settings.iX = db_get_dw(0, CHAT_MODULE, "roomx", -1); g_Settings.iY = db_get_dw(0, CHAT_MODULE, "roomy", -1); @@ -245,7 +238,5 @@ void Unload_ChatModule() db_set_dw(0, CHAT_MODULE, "roomwidth", g_Settings.iWidth); db_set_dw(0, CHAT_MODULE, "roomheight", g_Settings.iHeight); - if (g_Settings.MessageAreaFont) - DeleteObject(g_Settings.MessageAreaFont); DestroyMenu(g_hMenu); } diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 39edc37781..52106ae755 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void CMsgDialog::LoadSettings() { m_clrInputBG = db_get_dw(0, CHAT_MODULE, "ColorMessageBG", GetSysColor(COLOR_WINDOW)); - m_clrInputFG = g_Settings.MessageAreaColor; + LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &m_clrInputFG); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -64,17 +64,6 @@ void CMsgDialog::UpdateOptions() m_pLog->UpdateOptions(); - CHARFORMAT2 cf; - cf.cbSize = sizeof(CHARFORMAT2); - cf.dwMask = CFM_COLOR | CFM_BOLD | CFM_UNDERLINE | CFM_BACKCOLOR; - cf.dwEffects = 0; - cf.crTextColor = g_Settings.MessageAreaColor; - cf.crBackColor = m_clrInputBG; - - m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_clrInputBG); - m_message.SendMsg(WM_SETFONT, (WPARAM)g_Settings.MessageAreaFont, MAKELPARAM(TRUE, 0)); - m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf); - // nicklist int ih = Chat_GetTextPixelSize(L"AQGglo", g_Settings.UserListFont, FALSE); int ih2 = Chat_GetTextPixelSize(L"AQGglo", g_Settings.UserListHeadingsFont, FALSE); diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 6dd1a92181..9d2e1ca151 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -144,9 +144,6 @@ struct GlobalLogSettings : public GlobalLogSettingsBase int iX, iY;
int iSplitterX, iSplitterY;
bool bTabsEnable, bTabsAtBottom, bTabCloseOnDblClick;
-
- HFONT MessageAreaFont;
- COLORREF MessageAreaColor;
};
/////////////////////////////////////////////////////////////////////////////////////////
|