Skip to content

Write an Xbox Game Bar widget's icons from the Windows target - #1

Merged
RyanEwen merged 1 commit into
mainfrom
game-bar-icons
Nov 23, 2026
Merged

RyanEwen merged 1 commit into
mainfrom
game-bar-icons

Conversation

@RyanEwen

Copy link
Copy Markdown
Collaborator

Adds an optional gameBarIcons folder to the devkit-icons Windows target. When it's set, devkit also writes the icon set Xbox Game Bar reads from a widget's PublicFolder, named as Microsoft's widget icon guide gives them:

  • icon.targetsize-{16,20,24,32,44,256}.png from icon.svg, for Game Bar's dark theme;
  • icon.light.targetsize-{16,20,24,32,44,256}.png from icon-mono.svg drawn dark (the same light form as the Windows light-taskbar icons), for its light theme.

All of them are transparent, like the rest of the Windows target. A value that isn't a string fails with targets.windows.gameBarIcons must be a path. Without the option, nothing changes.

First user: ChatMixr's Game Bar widget, which today draws these icons with a script of its own. That script is gone from ChatMixr's main branch now that its icon comes from an SVG master.

Checks

  • Two new tests cover the twelve files at their sizes, the dark and light pixel colours, nothing written without the option, and the validation message.
  • npm test: 304 pass, 1 skipped (the host-listener test, which needs a live proxy).
  • npm run format:check and npm run lint pass.

A minor release (new option, no behaviour change).

AI disclosure: this pull request and the related code were written with the assistance of AI.

A Windows target can set gameBarIcons to a folder; devkit-icons then writes the icon set Game Bar
reads from a widget's PublicFolder: icon.targetsize-<size>.png at 16, 20, 24, 32, 44 and 256 px from
icon.svg, and icon.light.targetsize-<size>.png from icon-mono.svg drawn dark for Game Bar's light
theme. Apps with a Game Bar widget no longer need a generator of their own for it.
@RyanEwen
RyanEwen marked this pull request as ready for review November 23, 2026 04:23
@RyanEwen
RyanEwen merged commit 21be940 into main Nov 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant