From 3ccf3859a69cd7515f47bf4d3d5afb91c5d1c630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 20 Jul 2012 17:12:07 +0000 Subject: clist_modern: - meta contacts fix - groups highlighting and selecting fix git-svn-id: http://svn.miranda-ng.org/main/trunk@1084 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcpaint.cpp | 43 +++++----------------------- 1 file changed, 7 insertions(+), 36 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 31e2dd2386..ce8c16421b 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -944,19 +944,9 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str if ( dat->text_rtl != 0 ) _RTLRect( &nameRect, free_row_rc.right, dx ); _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); - if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' ) - { - int idx = 0; - if ( dat->filterSearch ) - { - TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); - if (p1) - idx = int(p1 - lowered); - } - + if (selected && !dat->filterSearch) { SetTextColor( hdcMem, dat->quickSearchColour ); - _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); + _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); } if ( szCounts && strlen( szCounts )>0 ) { @@ -1029,7 +1019,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str _SetHotTrackColour( hdcMem, dat ); if ( dat->text_rtl != 0 ) _RTLRect( &text_rect, free_row_rc.right, dx ); _DrawTextSmiley( hdcMem, &text_rect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); - if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' ) + if ( ((dat->filterSearch && Drawing->type != CLCIT_GROUP) || selected) && dat->szQuickSearch[0] != '\0' ) { int idx = 0; if ( dat->filterSearch ) @@ -1219,18 +1209,9 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str else if ( hottrack ) _SetHotTrackColour( hdcMem, dat ); _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); - if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' ) - { - int idx = 0; - if ( dat->filterSearch ) - { - TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); - if (p1) - idx = int(p1 - lowered); - } + if (selected && !dat->filterSearch) { SetTextColor( hdcMem, dat->quickSearchColour ); - _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, idx, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); + _DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, 0, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys ); } if ( szCounts && strlen( szCounts )>0 ) { @@ -3170,24 +3151,14 @@ void CLCPaint::_DrawContactText( HDC hdcMem, struct ClcData *dat, struct ClcCont ChangeToFont( hdcMem, dat, GetBasicFontID( Drawing ), NULL ); if ( selected ) SetTextColor( hdcMem, dat->force_in_dialog ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour ); - else if ( hottrack || (dat->filterSearch && dat->szQuickSearch[0] != '\0' ) ) + else if ( hottrack || (dat->filterSearch && dat->szQuickSearch[0] != '\0' && Drawing->type != CLCIT_GROUP) ) _SetHotTrackColour( hdcMem, dat ); if ( Drawing->type == CLCIT_GROUP ) { ske_DrawText( hdcMem, Drawing->szText, -1, prcItem, uTextFormat ); - if ( (dat->filterSearch || selected) && dat->szQuickSearch[0] != '\0' ) - { - int idx = 0; - if ( dat->filterSearch ) - { - TCHAR *lowered = CharLowerW(NEWTSTR_ALLOCA(Drawing->szText)); - TCHAR *p1 = _tcsstr(lowered, dat->szQuickSearch); - if (p1) - idx = int(p1 - lowered); - } + if (selected && !dat->filterSearch) { SetTextColor( hdcMem, dat->quickSearchColour ); -// ske_DrawText( hdcMem, &Drawing->szText[idx], lstrlen( dat->szQuickSearch ), prcItem, uTextFormat ); ske_DrawText( hdcMem, Drawing->szText, lstrlen( dat->szQuickSearch ), prcItem, uTextFormat ); } } -- cgit v1.2.3