Icon style (colorized or grayscale), part 2, README update

This commit is contained in:
2026-11-06 16:00:43 +00:00
parent ecde38f9e8
commit 9e6b24268f
3 changed files with 201 additions and 2 deletions
+2 -2
View File
@@ -122,7 +122,7 @@ func previewPaint(hwnd uintptr) {
isz := px(16)
if pvIcon != 0 {
y := pvTitleR.Top + (pvTitleR.Bottom-pvTitleR.Top-isz)/2
pDrawIconEx.Call(hdc, uintptr(pvTitleR.Left), uintptr(y), pvIcon, uintptr(isz), uintptr(isz), 0, 0, diNormal)
pDrawIconEx.Call(hdc, uintptr(pvTitleR.Left), uintptr(y), styledIcon(pvIcon), uintptr(isz), uintptr(isz), 0, 0, diNormal)
}
pSetBkMode.Call(hdc, transparent)
pSetTextColor.Call(hdc, rgb(240, 240, 245))
@@ -136,7 +136,7 @@ func previewPaint(hwnd uintptr) {
big := px(48)
cx := (pvThumbR.Left + pvThumbR.Right) / 2
cy := (pvThumbR.Top + pvThumbR.Bottom) / 2
pDrawIconEx.Call(hdc, uintptr(cx-big/2), uintptr(cy-big/2), pvIcon, uintptr(big), uintptr(big), 0, 0, diNormal)
pDrawIconEx.Call(hdc, uintptr(cx-big/2), uintptr(cy-big/2), styledIcon(pvIcon), uintptr(big), uintptr(big), 0, 0, diNormal)
}
pEndPaint.Call(hwnd, uintptr(unsafe.Pointer(&ps)))
}