summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcpaint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcpaint.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp451
1 files changed, 0 insertions, 451 deletions
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index a06a0c4b2a..f0c91c8a9c 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -899,457 +899,6 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R
minheight = max(minheight, height);
dy += (minheight > height) ? ((minheight - height) >> 1) : 0;
- // Call Placement
- cppCalculateRowItemsPos(gl_RowRoot, free_row_rc.right - free_row_rc.left);
- // Now paint
- while ((gl_RowTabAccess[i] != nullptr || (i < 2 && Drawing->type == CLCIT_GROUP)) && !(i >= 2 && Drawing->type == CLCIT_GROUP)) {
- if (gl_RowTabAccess[i]->r.right - gl_RowTabAccess[i]->r.left > 0 && gl_RowTabAccess[i]->r.bottom - gl_RowTabAccess[i]->r.top > 0) {
- RECT p_rect = gl_RowTabAccess[i]->r;
- OffsetRect(&p_rect, dx, dy);
- if (dat->text_rtl != 0 && gl_RowTabAccess[i]->type != TC_EXTRA /*each extra icon modified separately*/)
- _RTLRect(&p_rect, free_row_rc.right);
-
- SIZE text_size;
- switch (gl_RowTabAccess[i]->type) {
- case TC_TEXT1:
- {
- // paint text 1
- UINT uTextFormat = (dat->text_rtl ? DT_RTLREADING : 0);
- text_size.cx = p_rect.right - p_rect.left;
- text_size.cy = p_rect.bottom - p_rect.top;
- ChangeToFont(hdcMem, dat, GetBasicFontID(Drawing), nullptr);
-
- uTextFormat |= (gl_RowTabAccess[i]->valign == TC_VCENTER) ? DT_VCENTER : (gl_RowTabAccess[i]->valign == TC_BOTTOM) ? DT_BOTTOM : 0;
- uTextFormat |= (gl_RowTabAccess[i]->halign == TC_HCENTER) ? DT_CENTER : (gl_RowTabAccess[i]->halign == TC_RIGHT) ? DT_RIGHT : 0;
-
- uTextFormat = uTextFormat | (gl_TrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE;
- if (Drawing->type == CLCIT_CONTACT) {
- if (selected)
- SetTextColor(hdcMem, dat->selTextColour);
- else if (hottrack)
- _SetHotTrackColour(hdcMem, dat);
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, 0, (int)mir_wstrlen(Drawing->szText), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys);
- if ((dat->bFilterSearch || selected) && dat->szQuickSearch[0] != '\0') {
- int idx = 0;
- if (dat->bFilterSearch) {
- wchar_t *lowered = CharLowerW(NEWWSTR_ALLOCA(Drawing->szText));
- wchar_t *lowered_search = CharLowerW(NEWWSTR_ALLOCA(dat->szQuickSearch));
- wchar_t *p1 = wcsstr(lowered, lowered_search);
- if (p1)
- idx = int(p1 - lowered);
- }
- SetTextColor(hdcMem, dat->quickSearchColour);
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, Drawing->szText, idx, (int)mir_wstrlen(dat->szQuickSearch), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys);
- }
-
- SIZE size;
- GetTextSize(&size, hdcMem, p_rect, Drawing->szText, Drawing->ssText.plText, 0, dat->text_resize_smileys ? 0 : Drawing->ssText.iMaxSmileyHeight);
- Drawing->pos_label = p_rect;
- Drawing->pos_label.right = min(Drawing->pos_label.right, Drawing->pos_label.left + size.cx);
- }
- else if (Drawing->type == CLCIT_GROUP) {
- RECT nameRect = p_rect;
- RECT countRect = { 0 };
- RECT count_rc = { 0 };
- SIZE count_size = { 0 };
- int space_width = 0;
- wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing);
- // Has to draw the count?
- if (szCounts && mir_wstrlen(szCounts) > 0) {
- // calc width and height
- ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS, nullptr);
- ske_DrawText(hdcMem, L" ", 1, &count_rc, DT_CALCRECT | DT_NOPREFIX);
- count_size.cx = count_rc.right - count_rc.left;
- space_width = count_size.cx;
- count_rc.right = 0;
- count_rc.left = 0;
- ske_DrawText(hdcMem, szCounts, (int)mir_wstrlen(szCounts), &count_rc, DT_CALCRECT);
- count_size.cx += count_rc.right - count_rc.left;
- count_size.cy = count_rc.bottom - count_rc.top;
- }
- // modify text rect
- {
- SIZE grp_size = { 0 };
- int wid = p_rect.right - p_rect.left;
- ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPS : FONTID_CLOSEDGROUPS, nullptr);
- GetTextSize(&grp_size, hdcMem, p_rect, Drawing->szText, Drawing->ssText.plText, 0, dat->text_resize_smileys ? 0 : Drawing->ssText.iMaxSmileyHeight);
-
- if (wid - count_size.cx > grp_size.cx) {
- if (dat->row_align_group_mode != 2) { //center or left
- int x = (dat->row_align_group_mode == 1) ? (wid - (grp_size.cx + count_size.cx)) >> 1 : 0;
- nameRect.left += x;
- nameRect.right = nameRect.left + grp_size.cx;
- countRect.left = nameRect.right + space_width;
- countRect.right = countRect.left + count_size.cx - space_width;
- }
- else {
- countRect.right = nameRect.right;
- countRect.left = countRect.right - ((count_size.cx > 0) ? (count_size.cx - space_width) : 0);
- nameRect.right = countRect.left - ((count_size.cx > 0) ? space_width : 0);
- nameRect.left = nameRect.right - grp_size.cx;
- }
- }
- else {
- countRect.right = nameRect.right;
- nameRect.right -= count_size.cx;
- countRect.left = nameRect.right + space_width;
- }
- countRect.bottom = nameRect.bottom;
- countRect.top = nameRect.top;
- }
-
- uTextFormat |= DT_VCENTER;
- ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPS : FONTID_CLOSEDGROUPS, nullptr);
- if (selected)
- SetTextColor(hdcMem, dat->selTextColour);
- else if (hottrack)
- _SetHotTrackColour(hdcMem, dat);
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, (int)mir_wstrlen(Drawing->szText), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys);
- if (selected && !dat->bFilterSearch) {
- SetTextColor(hdcMem, dat->quickSearchColour);
- _DrawTextSmiley(hdcMem, &nameRect, &text_size, Drawing->szText, 0, (int)mir_wstrlen(Drawing->szText), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys);
- }
- if (szCounts && mir_wstrlen(szCounts) > 0) {
- ChangeToFont(hdcMem, dat, Drawing->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS, nullptr);
- if (selected)
- SetTextColor(hdcMem, dat->selTextColour);
- else if (hottrack)
- _SetHotTrackColour(hdcMem, dat);
- ske_DrawText(hdcMem, szCounts, (int)mir_wstrlen(szCounts), &countRect, uTextFormat);
- }
- Drawing->pos_label = nameRect;
- }
- }
- break;
-
- case TC_TEXT2:
- {
- // paint text 2
- //
- // Select font
- UINT uTextFormat = (dat->text_rtl ? DT_RTLREADING : 0);
-
- if (g_plugin.secondLine.bActive && g_plugin.secondLine.iType == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
- // Get contact time
- wchar_t buf[70] = L"";
- mir_free_and_nil(pdnce->szSecondLineText);
-
- TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
- pdnce->szSecondLineText = mir_wstrdup(buf);
- }
-
- uTextFormat |= (gl_RowTabAccess[i]->valign == TC_VCENTER) ? DT_VCENTER : (gl_RowTabAccess[i]->valign == TC_BOTTOM) ? DT_BOTTOM : 0;
- uTextFormat |= (gl_RowTabAccess[i]->halign == TC_HCENTER) ? DT_CENTER : (gl_RowTabAccess[i]->halign == TC_RIGHT) ? DT_RIGHT : 0;
-
- text_size.cx = p_rect.right - p_rect.left;
- text_size.cy = p_rect.bottom - p_rect.top;
-
- ChangeToFont(hdcMem, dat, FONTID_SECONDLINE, nullptr);
- uTextFormat = uTextFormat | (gl_TrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE;
- if (Drawing->type == CLCIT_CONTACT)
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szSecondLineText, 0, (int)mir_wstrlen(pdnce->szSecondLineText), pdnce->ssSecondLine.plText, uTextFormat, dat->text_resize_smileys);
- }
- break;
-
- case TC_TEXT3:
- {
- //paint text 3
- // Select font
- UINT uTextFormat = (dat->text_rtl ? DT_RTLREADING : 0);
-
- if (g_plugin.thirdLine.bActive && g_plugin.thirdLine.iType == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
- // Get contact time
- wchar_t buf[70] = L"";
- mir_free(pdnce->szThirdLineText);
-
- TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", buf, _countof(buf), 0);
- pdnce->szThirdLineText = mir_wstrdup(buf);
- }
-
- uTextFormat |= (gl_RowTabAccess[i]->valign == TC_VCENTER) ? DT_VCENTER : (gl_RowTabAccess[i]->valign == TC_BOTTOM) ? DT_BOTTOM : 0;
- uTextFormat |= (gl_RowTabAccess[i]->halign == TC_HCENTER) ? DT_CENTER : (gl_RowTabAccess[i]->halign == TC_RIGHT) ? DT_RIGHT : 0;
-
- text_size.cx = p_rect.right - p_rect.left;
- text_size.cy = p_rect.bottom - p_rect.top;
-
- ChangeToFont(hdcMem, dat, FONTID_THIRDLINE, nullptr);
- uTextFormat = uTextFormat | (gl_TrimText ? DT_END_ELLIPSIS : 0) | DT_SINGLELINE;
- if (Drawing->type == CLCIT_CONTACT)
- _DrawTextSmiley(hdcMem, &p_rect, &text_size, pdnce->szThirdLineText, 0, (int)mir_wstrlen(pdnce->szThirdLineText), pdnce->ssThirdLine.plText, uTextFormat, dat->text_resize_smileys);
- }
- break;
-
- case TC_STATUS:
- if ((Drawing->type == CLCIT_GROUP && !dat->row_hide_group_icon) || (Drawing->type == CLCIT_CONTACT && Drawing->iImage != -1
- && !(dat->icon_hide_on_avatar && dat->avatars_show && Drawing->avatar_data != nullptr && !Drawing->bImageIsSpecial))) {
- int iImage = -1;
- // Get image
- if (Drawing->type == CLCIT_GROUP) {
- if (!dat->row_hide_group_icon) iImage = Drawing->group->expanded ? IMAGE_GROUPOPEN : IMAGE_GROUPSHUT;
- else iImage = -1;
- }
- else if (Drawing->type == CLCIT_CONTACT)
- iImage = Drawing->iImage;
-
- if (iImage != -1) {
- COLORREF colourFg;
- int mode;
- // Store pos
- Drawing->pos_icon = p_rect;
- if (hottrack) {
- colourFg = dat->hotTextColour;
- mode = ILD_NORMAL;
- }
- else if (Drawing->type == CLCIT_CONTACT && Drawing->flags & CONTACTF_NOTONLIST) {
- colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
- mode = ILD_BLEND50;
- }
- else {
- colourFg = dat->selBkColour;
- mode = ILD_NORMAL;
- }
-
- if (Drawing->type == CLCIT_CONTACT && dat->bShowIdle && (Drawing->flags & CONTACTF_IDLE) &&
- Clist_GetRealStatus(Drawing, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
- mode = ILD_SELECTED;
- }
-
- _DrawStatusIcon(Drawing, dat, iImage, hdcMem, p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode);
- }
- }
- break;
-
- case TC_AVATAR:
- {
- BOOL hasAvatar = Drawing->avatar_data != nullptr;
- BYTE blendmode = 255;
- if (hottrack)
- blendmode = 255;
- else if (Drawing->type == CLCIT_CONTACT && Drawing->flags & CONTACTF_NOTONLIST)
- blendmode = 128;
- if (Drawing->type == CLCIT_CONTACT && dat->bShowIdle && (Drawing->flags & CONTACTF_IDLE) && Clist_GetRealStatus(Drawing, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
- blendmode = 128;
- if (!hasAvatar) { // if no avatar then paint icon image
- int iImage = Drawing->iImage;
- if (iImage != -1) {
- COLORREF colourFg;
- int mode;
- // Store pos
- Drawing->pos_icon = p_rect;
- if (hottrack) {
- colourFg = dat->hotTextColour;
- mode = ILD_NORMAL;
- }
- else if (Drawing->type == CLCIT_CONTACT && Drawing->flags & CONTACTF_NOTONLIST) {
- colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
- mode = ILD_BLEND50;
- }
- else {
- colourFg = dat->selBkColour;
- mode = ILD_NORMAL;
- }
-
- if (Drawing->type == CLCIT_CONTACT && dat->bShowIdle && (Drawing->flags & CONTACTF_IDLE) && Clist_GetRealStatus(Drawing, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
- mode = ILD_SELECTED;
-
- _DrawStatusIcon(Drawing, dat, iImage, hdcMem, p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode);
- }
- }
- else {
- HRGN rgn = nullptr;
- int round_radius = 0;
- int ava_width = p_rect.right - p_rect.left;
- int ava_height = p_rect.bottom - p_rect.top;
- // Store pos
- Drawing->pos_avatar = p_rect;
- HRGN oldrgn = CreateRectRgn(0, 0, 0, 0);
- GetClipRgn(hdcMem, oldrgn);
-
- // Round corners
- if (dat->avatars_round_corners) {
- if (dat->avatars_use_custom_corner_size)
- round_radius = dat->avatars_custom_corner_size;
- else
- round_radius = min(ava_width, ava_height) / 5;
- }
- else round_radius = 0;
-
- if (dat->avatars_draw_border) {
- HBRUSH hBrush = CreateSolidBrush(dat->avatars_border_color);
- HBRUSH hOldBrush = (HBRUSH)SelectObject(hdcMem, hBrush);
- HRGN rgn2;
- rgn = CreateRoundRectRgn(p_rect.left, p_rect.top, p_rect.right + 1, p_rect.bottom + 1, round_radius << 1, round_radius << 1);
- rgn2 = CreateRoundRectRgn(p_rect.left + 1, p_rect.top + 1, p_rect.right, p_rect.bottom, round_radius << 1, round_radius << 1);
- CombineRgn(rgn2, rgn, rgn2, RGN_DIFF);
- // FrameRgn(hdcMem, rgn, hBrush, 1, 1 );
- FillRgn(hdcMem, rgn2, hBrush);
- ske_SetRgnOpaque(hdcMem, rgn2);
- SelectObject(hdcMem, hOldBrush);
- DeleteObject(hBrush);
- DeleteObject(rgn);
- DeleteObject(rgn2);
- }
- if (dat->avatars_round_corners || dat->avatars_draw_border) {
- int k = dat->avatars_draw_border ? 1 : 0;
- rgn = CreateRoundRectRgn(p_rect.left + k, p_rect.top + k, p_rect.right + 1 - k, p_rect.bottom + 1 - k, round_radius * 2, round_radius * 2);
- ExtSelectClipRgn(hdcMem, rgn, RGN_AND);
- }
-
- // Draw avatar
- _DrawContactAvatar(hdcMem, dat, Drawing, &row_rc, selected, hottrack, &p_rect);
-
- // Restore region
- if (dat->avatars_round_corners || dat->avatars_draw_border)
- DeleteObject(rgn);
-
- SelectClipRgn(hdcMem, oldrgn);
- DeleteObject(oldrgn);
-
- // Draw borders
-
- //TODO fix overlays
- // Draw overlay
- if (dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + (dat->avatars_draw_border ? 2 : 0)
- && GetContactCachedStatus(Drawing->hContact) - ID_STATUS_OFFLINE < _countof(g_pAvatarOverlayIcons)) {
- p_rect.top = p_rect.bottom - ICON_HEIGHT;
- p_rect.left = p_rect.right - ICON_HEIGHT;
-
- if (dat->avatars_draw_border) {
- p_rect.top--;
- p_rect.left--;
- }
-
- switch (dat->avatars_overlay_type) {
- case SETTING_AVATAR_OVERLAY_TYPE_NORMAL:
- {
- UINT a = blendmode;
- a = (a << 24);
- ske_ImageList_DrawEx(hAvatarOverlays, g_pAvatarOverlayIcons[GetContactCachedStatus(Drawing->hContact) - ID_STATUS_OFFLINE].listID,
- hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
- CLR_NONE, CLR_NONE,
- (blendmode == 255) ? ILD_NORMAL : (blendmode == 128) ? ILD_BLEND50 : ILD_BLEND25);
- }
- break;
- case SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL:
- {
- int item = g_clistApi.pfnIconFromStatusMode(Drawing->pce->szProto, Drawing->pce->szProto == nullptr ? ID_STATUS_OFFLINE : GetContactCachedStatus(Drawing->hContact), Drawing->hContact);
- if (item != -1)
- _DrawStatusIcon(Drawing, dat, item, hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
- CLR_NONE, CLR_NONE, (blendmode == 255) ? ILD_NORMAL : (blendmode == 128) ? ILD_BLEND50 : ILD_BLEND25);
- }
- break;
- case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
- if (Drawing->iImage != -1)
- _DrawStatusIcon(Drawing, dat, Drawing->iImage, hdcMem,
- p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
- CLR_NONE, CLR_NONE, (blendmode == 255) ? ILD_NORMAL : (blendmode == 128) ? ILD_BLEND50 : ILD_BLEND25);
- break;
- }
- }
- }
- }
- break;
-
- case TC_EXTRA:
- if (Drawing->type == CLCIT_CONTACT &&
- (!Drawing->iSubNumber || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0)) {
- int BlendedInActiveState = dat->dbbBlendInActiveState;
- int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- int count = 0;
- RECT rc;
- int x = 0;
- for (int iImage = 0; iImage < dat->extraColumnsCount; iImage++) {
- COLORREF colourFg = dat->selBkColour;
- int mode = BlendedInActiveState ? BlendValue : ILD_NORMAL;
- if (Drawing->iExtraImage[iImage] == EMPTY_EXTRA_ICON) {
- if (!dat->bMetaIgnoreEmptyExtra) {
- SetRect(&rc, p_rect.left + x, p_rect.top, p_rect.left + x + ICON_HEIGHT, p_rect.bottom);
- x += dat->extraColumnSpacing;
- if (dat->text_rtl != 0) _RTLRect(&rc, free_row_rc.right);
- Drawing->pos_extra[iImage] = rc;
- count++;
- }
- continue;
- }
-
- if (selected)
- mode = BlendedInActiveState ? ILD_NORMAL : ILD_SELECTED;
- else if (hottrack) {
- mode = BlendedInActiveState ? ILD_NORMAL : ILD_FOCUS;
- colourFg = dat->hotTextColour;
- }
- else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags & CONTACTF_NOTONLIST)) {
- colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
- mode = BlendValue;
- }
-
- SetRect(&rc, p_rect.left + x, p_rect.top, p_rect.left + x + ICON_HEIGHT, p_rect.bottom);
- x += dat->extraColumnSpacing;
- count++;
- if (dat->text_rtl != 0) _RTLRect(&rc, free_row_rc.right);
- Drawing->pos_extra[iImage] = rc;
- if (Drawing->iExtraImage[iImage] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx(dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
- rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode);
- }
- }
- break;
-
- case TC_EXTRA1:
- case TC_EXTRA2:
- case TC_EXTRA3:
- case TC_EXTRA4:
- case TC_EXTRA5:
- case TC_EXTRA6:
- case TC_EXTRA7:
- case TC_EXTRA8:
- case TC_EXTRA9:
- if (Drawing->type == CLCIT_CONTACT && (!Drawing->iSubNumber || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0)) {
- int eNum = gl_RowTabAccess[i]->type - TC_EXTRA1;
- if (eNum < dat->extraColumnsCount) {
- if (Drawing->iExtraImage[eNum] != EMPTY_EXTRA_ICON) {
- COLORREF colourFg = RGB(0, 0, 0);
- int mode = 0;
- int BlendedInActiveState = dat->dbbBlendInActiveState;
- int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- if (mode2 != -1) mode = mode2;
- else {
- if (selected) mode = BlendedInActiveState ? ILD_NORMAL : ILD_SELECTED;
- else if (hottrack) {
- mode = BlendedInActiveState ? ILD_NORMAL : ILD_FOCUS;
- colourFg = dat->hotTextColour;
- }
- else if (Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST) {
- colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
- mode = BlendValue;
- }
- mode2 = mode;
- }
- if (dat->text_rtl != 0) _RTLRect(&p_rect, free_row_rc.right);
- Drawing->pos_extra[eNum] = p_rect;
- if (Drawing->iExtraImage[eNum] != EMPTY_EXTRA_ICON)
- ske_ImageList_DrawEx(dat->himlExtraColumns, Drawing->iExtraImage[eNum], hdcMem,
- p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode);
- }
- }
- }
- break;
-
- case TC_TIME:
- wchar_t szResult[80];
- if (!TimeZone_PrintDateTime(pdnce->hTimeZone, L"t", szResult, _countof(szResult), 0)) {
- // Select font
- ChangeToFont(hdcMem, dat, FONTID_CONTACT_TIME, nullptr);
- ske_DrawText(hdcMem, szResult, (int)mir_wstrlen(szResult), &p_rect, DT_NOPREFIX | DT_SINGLELINE | (dat->text_rtl ? DT_RTLREADING : 0));
- }
- break;
- }
- }
- i++;
- }
- return;
}
void CLCPaint::_DrawStatusIcon(ClcContact *Drawing, ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode)