From aa23f64e684fd892a2ae51eacb71c66434efc4d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Sep 2023 13:11:32 +0300 Subject: minor code unification --- plugins/Scriver/src/msgutils.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 4f4fb2349b..bdf74f2101 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -620,13 +620,10 @@ void CMsgDialog::UpdateOptions() { GetAvatar(); - UpdateFilterButton(); UpdateStatusBar(); UpdateTitle(); FixTabIcons(); - m_pLog->UpdateOptions(); - // messagebox COLORREF crFore; LoadMsgDlgFont(MSGFONTID_MESSAGEAREA, nullptr, &crFore); @@ -640,20 +637,20 @@ void CMsgDialog::UpdateOptions() m_message.SendMsg(EM_SETBKGNDCOLOR, 0, g_plugin.getDword(SRMSGSET_INPUTBKGCOLOUR, SRMSGDEFSET_INPUTBKGCOLOUR)); m_message.SendMsg(WM_SETFONT, (WPARAM)g_Settings.MessageBoxFont, MAKELPARAM(TRUE, 0)); m_message.SendMsg(EM_SETCHARFORMAT, SCF_ALL, (LPARAM)& cf); - { - // nicklist - int ih = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListFont, false); - int ih2 = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListHeadingsFont, false); - int height = db_get_b(0, CHAT_MODULE, "NicklistRowDist", 12); - int font = ih > ih2 ? ih : ih2; + + // nicklist + int ih = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListFont, false); + int ih2 = Chat_GetTextPixelSize(L"AQG_glo'", g_Settings.UserListHeadingsFont, false); + int height = db_get_b(0, CHAT_MODULE, "NicklistRowDist", 12); + int font = ih > ih2 ? ih : ih2; - // make sure we have space for icon! - if (Chat::bShowContactStatus) - font = font > 16 ? font : 16; + // make sure we have space for icon! + if (Chat::bShowContactStatus) + font = font > 16 ? font : 16; + + m_nickList.SendMsg(LB_SETITEMHEIGHT, 0, height > font ? height : font); + InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE); - m_nickList.SendMsg(LB_SETITEMHEIGHT, 0, height > font ? height : font); - InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE); - } m_message.SendMsg(EM_REQUESTRESIZE, 0, 0); CSuper::UpdateOptions(); -- cgit v1.2.3