From 303c2fb05ca6a8ea2c73b3067773d418aa323399 Mon Sep 17 00:00:00 2001 From: sje Date: Thu, 26 Apr 2007 15:44:54 +0000 Subject: added title underline git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@159 4f64403b-2f21-0410-a795-97e2b3489a10 --- yapp/popwin.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'yapp/popwin.cpp') diff --git a/yapp/popwin.cpp b/yapp/popwin.cpp index 4f9c5a3..219e302 100644 --- a/yapp/popwin.cpp +++ b/yapp/popwin.cpp @@ -143,7 +143,7 @@ struct PopupWindowData { int new_x, new_y; bool is_round, av_is_round, mouse_in, close_on_leave; bool custom_col; - HBRUSH bkBrush, barBrush; + HBRUSH bkBrush, barBrush, underlineBrush; HPEN bPen; TCHAR tbuff[128]; int tb_height, av_height, text_height, time_height, time_width; @@ -186,9 +186,11 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa DWORD darkBg = pd->colorBack - ((pd->colorBack >> 2) & 0x3f3f3f); // 3/4 of current individual RGB components pwd->barBrush = CreateSolidBrush(darkBg); // make sidebar a dark version of the bg + pwd->underlineBrush = CreateSolidBrush(pd->colorBack); // make sidebar a dark version of the bg } else { pwd->bkBrush = CreateSolidBrush(colBg); pwd->barBrush = CreateSolidBrush(colSidebar); + pwd->underlineBrush = CreateSolidBrush(colTitleUnderline); } if(options.border) pwd->bPen = (HPEN)CreatePen(PS_SOLID, 1, colBorder); @@ -478,6 +480,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa else SetTextColor(ps.hdc, colFirstLine); DrawTextW(ps.hdc, pd->lptzContactName, wcslen(pd->lpwzContactName), &tr, DT_VCENTER | DT_LEFT | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX); + // title underline + RECT tur; + tur.left = r.left + options.sb_width + options.padding; + tur.right = r.right - options.padding; + tur.top = tr.bottom + options.padding/2; + tur.bottom = tur.top + 1; + FillRect(ps.hdc, &tur, pwd->underlineBrush); + // second line(s) int len_second = wcslen(pd->lpwzText); if(len_second) { @@ -505,6 +515,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa DeleteObject(pwd->bkBrush); DeleteObject(pwd->bPen); DeleteObject(pwd->barBrush); + DeleteObject(pwd->underlineBrush); KillTimer(hwnd, ID_MOVETIMER); KillTimer(hwnd, ID_CLOSETIMER); -- cgit v1.2.3