Files
Liu b0c031f8dc feat: add window icon support
- Add ptk_window_set_icons with Win32 WM_SETICON, X11 _NET_WM_ICON and fb no-op.

- Add LCUI window/default icon APIs, DPI-aware HICON selection and pre-rendered built-in icon assets.

- Add pandagl memory image readers and fix bilinear zoom edge sampling.

- Cover file/data icons, defaults and high-DPI sizes with integration tests.
2026-11-21 23:26:34 +08:00

1.0 KiB

LCUI icon assets

  • lcui-icon.png: 256x256 current source (legacy hexagon LCUI logo). A new vector master is still pending.
  • lcui-icon-{16,24,32,48,64,128}.png: pre-rendered sizes used directly for the built-in window icon, so 16/32px do not go through runtime scaling.
  • lcui-icon.ico: externally provided multi-size ICO (16/32/48/256) for Windows executable resources (IDI_ICON ICON "lcui-icon.ico"). It is not generated by build-icon and is not used by the runtime window icon API; the runtime keeps using the pre-rendered PNGs because the ICO's small frames have palette fringing.

After replacing lcui-icon.png, re-export the pre-rendered sizes and ICO, then regenerate the embedded headers:

npm run build-icon

src/lcui_icon.c decodes the pre-rendered PNGs directly for the built-in icon; custom icons are decoded and scaled to 16/24/32/48/64/128/256. The generated src/resources/lcui-icon-*.png.inc files are checked in so normal xmake builds do not need Node or a rasterizer.