summaryrefslogtreecommitdiff
path: root/yapp/popwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/popwin.cpp')
-rw-r--r--yapp/popwin.cpp13
1 files changed, 12 insertions, 1 deletions
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);