Skip to content

Windows: Set non-client area icon - #356

Open
AlexCharlton wants to merge 1 commit into
RustAudio:masterfrom
AlexCharlton:win-set-icon
Open

AlexCharlton wants to merge 1 commit into
RustAudio:masterfrom
AlexCharlton:win-set-icon

Conversation

@AlexCharlton

Copy link
Copy Markdown
Contributor

As it stands, on Windows, the icon used in the non-client area (at the top left of the window) is always the default:
image

This PR provides a hopefully better default: We try to load the icon with the identifier "1". This is the default ID that winres uses, and is a loose convention for the application icon. If there is no such icon, Windows will fall back to the pre-existing default.

The alternative to choosing a default identifier would be to make this configurable (presumably through WindowSettings), but I think this is overkill for a single-platform feature that has a strong enough convention to take advantage of.

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