From 79c4ad2977650902c17531457721037afcfe0ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 29 Aug 2015 13:14:59 +0000 Subject: Clist_modern: Fix not aligning contact name when there is no avatar (broken in r14980) Calling _GetRectangle has to be here, because it provides side-effect for positioning contact name correctly. git-svn-id: http://svn.miranda-ng.org/main/trunk@15091 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcpaint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/Clist_modern/src/modern_clcpaint.cpp') diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 03552d3690..5ccdafd151 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -2,7 +2,7 @@ Miranda NG: the free IM client for Microsoft* Windows* -Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org), +Copyright (�) 2012-15 Miranda NG project (http://miranda-ng.org), Copyright (c) 2000-08 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. @@ -2056,7 +2056,9 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT // Has to keep the empty space?? if ((left && !dat->row_align_left_items_to_left) || (!left && !dat->row_align_right_items_to_right)) { // Make rectangle - // RECT rc = _GetRectangle(dat, &row_rc, &free_row_rc, &left_pos, &right_pos, left, max_width, max_width, dat->avatars_maxheight_size, HORIZONTAL_SPACE); + // NOTE: Calling _GetRectangle on next line has to be here, because it provides side-effect for positioning contact name correctly if contact has no avatar. + // It makes it aligned same way as if avatar was here. Just defining rc variable is useless, as it is never used (and just shows warning). + /*RECT rc =*/ _GetRectangle(dat, &row_rc, &free_row_rc, &left_pos, &right_pos, left, max_width, max_width, dat->avatars_maxheight_size, HORIZONTAL_SPACE); // Store position //StoreItemPos( Drawing, CIT_AVATAR, &rc ); -- cgit v1.2.3