Icon style (colorized or grayscale), part 1

This commit is contained in:
2026-11-06 16:00:27 +00:00
parent 1c43c4b4bd
commit ecde38f9e8
3 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -724,7 +724,7 @@ func drawAppGlyph(hdc uintptr, r rect, a appWin) {
isz := px(16) // the small taskbar icon size
if a.icon != 0 {
cx, cy := center(r)
pDrawIconEx.Call(hdc, uintptr(cx-isz/2), uintptr(cy-isz/2), a.icon, uintptr(isz), uintptr(isz), 0, 0, diNormal)
pDrawIconEx.Call(hdc, uintptr(cx-isz/2), uintptr(cy-isz/2), styledIcon(a.icon), uintptr(isz), uintptr(isz), 0, 0, diNormal)
} else if rs := []rune(a.title); len(rs) > 0 {
pSetBkMode.Call(hdc, transparent)
pSetTextColor.Call(hdc, rgb(245, 245, 245))
@@ -1218,6 +1218,7 @@ func main() {
loadOrient()
loadPinned()
loadOrderKeys()
loadIconMode()
hdc, _, _ := pGetDC.Call(0)
dpi, _, _ := pGetDeviceCaps.Call(hdc, logPixelsX)