Listview report mode tweaks #2

Dimitrie O. Paun dpaun at rogers.com
Fri Dec 20 12:55:09 CST 2002


On December 20, 2002 01:02 pm, Duane Clark wrote:
> So the only fix to LISTVIEW_GetSubItemRect that remains is to change the
> offset that is applied.

This looks great. Another small nit:
+    if (!(uFormat & (DT_RIGHT | DT_CENTER)))
+    {
+        if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon)) rcLabel.left += 2;
+        else rcLabel.left += 5;
+    }
+    else if (uFormat & DT_RIGHT) rcLabel.right -= 5;

It seems this "5" is the same, so maybe a symbolic constant would be better.
Also, it seems the 2 has to do with IMAGE_PADDING which you changed to 0,
so maybe a small rearangement can make this thing more clear.

What I mean is that you disabled image padding, and you achive it some
other way using explicit numbers (2, 5, etc). Turning the logic inside out, 
maybe we can give meaning back to IMAGE_PADDING. If not, we should remove it 
and introduce another meaningful constant.


-- 
Dimi.




More information about the wine-devel mailing list