Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the default icon ID to 32512 to be in line with the Windows default. #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,18 @@ impl WindowsResource {
self
}

/// Add an icon with nameID `1`.
/// Add an icon with nameID `32512`.
///
/// This icon need to be in `ico` format. The filename can be absolute
/// This icon needs to be in `ico` format. The filename can be absolute
/// or relative to the projects root.
///
/// Equivalent to `set_icon_with_id(path, "1")`.
/// Equivalent to `set_icon_with_id(path, "32512")`.
///
/// Windows uses `32512` as the default icon ID. See
/// [here](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadicona)
/// for Windows docs demonstrating this.
pub fn set_icon<'a>(&mut self, path: &'a str) -> &mut Self {
self.set_icon_with_id(path, "1")
self.set_icon_with_id(path, "32512")
}

/// Add an icon with the specified name ID.
Expand Down