Nikolay Sivov : comctl32/listview: Don' t offset to column bound calculating LVIR_LABEL for items.
Alexandre Julliard
julliard at winehq.org
Mon Aug 3 11:15:16 CDT 2009
Module: wine
Branch: master
Commit: 021410cf0e07b64f9347d3100f589b71d5e75ef7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=021410cf0e07b64f9347d3100f589b71d5e75ef7
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon Aug 3 02:15:10 2009 +0400
comctl32/listview: Don't offset to column bound calculating LVIR_LABEL for items.
---
dlls/comctl32/listview.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 0713308..59f70a2 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -319,7 +319,7 @@ typedef struct tagLISTVIEW_INFO
*/
/* How many we debug buffer to allocate */
#define DEBUG_BUFFERS 20
-/* The size of a single debug bbuffer */
+/* The size of a single debug buffer */
#define DEBUG_BUFFER_SIZE 256
/* Internal interface to LISTVIEW_HScroll and LISTVIEW_VScroll */
@@ -2202,7 +2202,12 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW
Label.right = Box.right;
if (infoPtr->uView == LV_VIEW_DETAILS)
{
- if (lpLVItem->iSubItem == 0) Label = lpColumnInfo->rcHeader;
+ if (lpLVItem->iSubItem == 0)
+ {
+ /* we need a zero based rect here */
+ Label = lpColumnInfo->rcHeader;
+ OffsetRect(&Label, -Label.left, 0);
+ }
}
if (lpLVItem->iSubItem || ((infoPtr->dwStyle & LVS_OWNERDRAWFIXED) && infoPtr->uView == LV_VIEW_DETAILS))
@@ -2267,7 +2272,8 @@ calc_label:
{
Label.left = Icon.right;
Label.top = Box.top;
- Label.right = lpColumnInfo->rcHeader.right;
+ Label.right = lpLVItem->iSubItem ? lpColumnInfo->rcHeader.right :
+ lpColumnInfo->rcHeader.right - lpColumnInfo->rcHeader.left;
Label.bottom = Label.top + infoPtr->nItemHeight;
}
else /* LV_VIEW_SMALLICON or LV_VIEW_LIST */
More information about the wine-cvs
mailing list