diff options
-rw-r--r-- | plugins/NewStory/src/fonts.cpp | 7 | ||||
-rw-r--r-- | plugins/NewStory/src/history_control.cpp | 8 | ||||
-rw-r--r-- | plugins/NewStory/src/stdafx.h | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/plugins/NewStory/src/fonts.cpp b/plugins/NewStory/src/fonts.cpp index c805a9a072..179a78416b 100644 --- a/plugins/NewStory/src/fonts.cpp +++ b/plugins/NewStory/src/fonts.cpp @@ -43,6 +43,9 @@ int evtFontsChanged(WPARAM, LPARAM) for (auto &it : g_colorTable) it.cl = Colour_Get(MODULENAME, it.szName); + DeleteObject(g_plugin.hBackBrush); + g_plugin.hBackBrush = CreateSolidBrush(g_colorTable[COLOR_SELBACK].cl); + for (auto &it : g_fontTable) { it.cl = (COLORREF)Font_Get(MODULENAME, it.szName, &it.lf); @@ -74,6 +77,8 @@ void InitFonts() it.cl = Colour_Get(cid.group, cid.name); } + g_plugin.hBackBrush = CreateSolidBrush(g_colorTable[COLOR_SELBACK].cl); + LOGFONT lfDefault; SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfDefault), &lfDefault, FALSE); @@ -98,6 +103,8 @@ void InitFonts() void DestroyFonts() { + DeleteObject(g_plugin.hBackBrush); + for (auto &it : g_fontTable) DeleteObject(it.hfnt); } diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 572c318a6b..fc5adebd39 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -1102,6 +1102,14 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM } break; + case WM_CTLCOLORSTATIC: + case WM_CTLCOLOREDIT: + if (lParam == INT_PTR(data->hwndEditBox)) { + SetBkColor((HDC)wParam, g_colorTable[COLOR_SELBACK].cl); + return (LRESULT)g_plugin.hBackBrush; + } + break; + case WM_DESTROY: WindowList_Add(g_hNewstoryLogs, hwnd); delete data; diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h index 57a34317e4..bcabaf8883 100644 --- a/plugins/NewStory/src/stdafx.h +++ b/plugins/NewStory/src/stdafx.h @@ -91,6 +91,7 @@ enum struct CMPlugin : public PLUGIN<CMPlugin> { HANDLE m_log; + HBRUSH hBackBrush; CMOption<bool> bOptVScroll, bSortAscending; bool bMsgGrouping, bDrawEdge; // thesw options are a copy of static CMOption to keep performance high |