From 98277c56ea0c28143395ca738a184e4d77245ccd Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Thu, 5 Nov 2009 23:45:14 +0000 Subject: patch to add frame background colour to miranda colour options (thx plobex) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@472 4f64403b-2f21-0410-a795-97e2b3489a10 --- alarms/frame.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'alarms/frame.cpp') diff --git a/alarms/frame.cpp b/alarms/frame.cpp index ff70d6e..6999d10 100644 --- a/alarms/frame.cpp +++ b/alarms/frame.cpp @@ -8,8 +8,9 @@ HWND hwnd_list = 0; int frame_id = -1; FontID font_id; +ColourID framebk_colour_id; HFONT hFont = 0; -COLORREF fontColour; +COLORREF fontColour, framebk; HBRUSH bk_brush = 0; AlarmList alarm_list; @@ -455,6 +456,10 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) { hFont = CreateFontIndirect(&log_font); SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); + DeleteObject(bk_brush); + bk_brush = CreateSolidBrush(DBGetContactSettingDword(0, "Alarm", "clFrameBack", GetSysColor(COLOR_3DFACE))); + RefreshReminderFrame(); + return 0; } @@ -602,12 +607,23 @@ int CreateFrame() font_id.order = 0; CallService(MS_FONT_REGISTER, (WPARAM)&font_id, 0); + framebk_colour_id.cbSize = sizeof(ColourID); + strcpy(framebk_colour_id.dbSettingsGroup, MODULE); + strcpy(framebk_colour_id.group, Translate("Frames")); + strcpy(framebk_colour_id.name, Translate("Alarm Reminders")); + strcpy(framebk_colour_id.setting, "clFrameBack"); + framebk_colour_id.defcolour = GetSysColor(COLOR_3DFACE); + framebk_colour_id.flags = 0; + framebk_colour_id.order = 0; + CallService(MS_COLOUR_REGISTER, (WPARAM)&framebk_colour_id, 0); + LOGFONT log_font; fontColour = CallService(MS_FONT_GET, (WPARAM)&font_id, (LPARAM)&log_font); hFont = CreateFontIndirect(&log_font); SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); HookEvent(ME_FONT_RELOAD, ReloadFont); + } else { LOGFONT lf; SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, FALSE); @@ -625,7 +641,7 @@ int CreateFrame() } // create the brush used for the background in the absence of clist_modern skinning features - match clist - bk_brush = CreateSolidBrush(DBGetContactSettingDword(0, "CLC", "BkColour", GetSysColor(COLOR_3DFACE))); + bk_brush = CreateSolidBrush(DBGetContactSettingDword(0, "Alarm", "clFrameBack", GetSysColor(COLOR_3DFACE))); SendMessage(hwnd_list, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); -- cgit v1.2.3