From 13971c8da041fce75d748d4c4ca527b70b3916e1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Jun 2018 11:33:08 +0300 Subject: CLC/TopMargin & CLC/BottomMargin - two hidden settings for Clist_modern skinning --- plugins/Clist_modern/src/modern_clc.h | 2 +- plugins/Clist_modern/src/modern_clcpaint.cpp | 3 +++ plugins/Clist_modern/src/modern_clcutils.cpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index 31986fed7c..a4dff8a27d 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -238,7 +238,7 @@ struct ClcData : public ClcDataBase time_t last_tick_time; bool bForceInDialog, bPlaceOfflineToRoot, bMetaIgnoreEmptyExtra, bMetaExpanding; int subIndent; - int rightMargin; + int rightMargin, topMargin, bottomMargin; HBITMAP hMenuBackground; DWORD MenuBkColor, MenuBkHiColor, MenuTextColor, MenuTextHiColor; int MenuBmpUse; diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 7de0e4022b..4f9016d2ce 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -1843,6 +1843,9 @@ void CLCPaint::_PaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *_rcPaint) RECT clRect; GetClientRect(hwnd, &clRect); + clRect.top += dat->topMargin; + clRect.bottom -= dat->bottomMargin; + RECT *rcPaint = _rcPaint ? _rcPaint : &clRect; // if null is transmitted - use whole client area // Invalidate ani avatars, avatars have to be validated in row paint routine below diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 0648e1434c..8c24177588 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -596,6 +596,8 @@ void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) else memset(&dat->thirdLine, 0, sizeof(dat->thirdLine)); dat->rightMargin = db_get_b(0, "CLC", "RightMargin", CLCDEFAULT_RIGHTMARGIN); + dat->topMargin = db_get_b(0, "CLC", "TopMargin", 0); + dat->bottomMargin = db_get_b(0, "CLC", "BottomMargin", 0); dat->bForceInDialog = (g_clistApi.hwndContactTree) ? (hwnd != g_clistApi.hwndContactTree) : 0; dat->subIndent = db_get_b(0, "CLC", "SubIndent", CLCDEFAULT_GROUPINDENT); -- cgit v1.2.3