diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-02 21:55:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-02 21:55:57 +0000 |
commit | 0ca0de7698b523effaaf6cc9c608e936fa5aaf86 (patch) | |
tree | 1e6ce038dc27a1ccddb5e3f863607c83eece2e98 /plugins/Clist_modern | |
parent | aeae01dc50a5adea8fe003c8195540b1f2b2169f (diff) |
useless calls of mir_*strlen in DrawText replaced with -1
git-svn-id: http://svn.miranda-ng.org/main/trunk@11223 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index bb64d2635b..635dd4c997 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -2572,7 +2572,7 @@ LRESULT CLUI::OnDrawItem(UINT msg, WPARAM wParam, LPARAM lParam) mir_snprintf(buf, SIZEOF(buf), "Main,ID=StatusMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
SetTextColor(dis->hDC, (dis->itemState&ODS_SELECTED/*|dis->itemState&ODS_HOTLIGHT*/) ? dat->MenuTextHiColor : dat->MenuTextColor);
- DrawText(dis->hDC, TranslateT("Status"), mir_tstrlen(TranslateT("Status")), &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
+ DrawText(dis->hDC, TranslateT("Status"), -1, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
nStatusMenuState = dis->itemState;
}
else {
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 2e144d30c4..076be367c1 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -2798,8 +2798,10 @@ BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT *lpRect, UINT form DWORD form = 0, color = 0; RECT r = *lpRect; OffsetRect(&r, 1, 1); - if (format & DT_RTLREADING) SetTextAlign(hdc, TA_RTLREADING); - if (format & DT_CALCRECT) return DrawText(hdc, lpString, nCount, lpRect, format); + if (format & DT_RTLREADING) + SetTextAlign(hdc, TA_RTLREADING); + if (format & DT_CALCRECT) + return DrawText(hdc, lpString, nCount, lpRect, format); if (format & DT_FORCENATIVERENDER || g_CluiData.fDisableSkinEngine) return DrawText(hdc, lpString, nCount, lpRect, format&~DT_FORCENATIVERENDER); |