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

Feature Request: Default window/tray icon from toml #3596

Open
Klemen2 opened this issue Jan 20, 2025 · 0 comments
Open

Feature Request: Default window/tray icon from toml #3596

Klemen2 opened this issue Jan 20, 2025 · 0 comments
Labels
cli Related to the dioxus-cli program consistency improve cohesiveness of features desktop Suggestions related to the desktop renderer

Comments

@Klemen2
Copy link
Contributor

Klemen2 commented Jan 20, 2025

Feature Request

Currently, when bundling an app with an icon option in the Dioxus.toml bundle, the provided icon will not be set for the window or trayicon (at least not on windows 11) - this is because if no icon is explicitly set, the default dioxus icon will be set instead. Preferably setting the icon in the toml file would also set it for the window and trayicon and only if none is set it would use the default.

Referenced code where default icon is loaded:

if cfg.window.window.window_icon.is_none() {
window = window.with_window_icon(Some(
tao::window::Icon::from_rgba(
include_bytes!("./assets/default_icon.bin").to_vec(),
460,
460,
)
.expect("image parse failed"),
));
}

.with_icon(match icon {
Some(value) => value,
None => tray_icon::Icon::from_rgba(
include_bytes!("./assets/default_icon.bin").to_vec(),
460,
460,
)
.expect("image parse failed"),
});

@Klemen2 Klemen2 changed the title Default icon Feature Request: Default icon Jan 20, 2025
@Klemen2 Klemen2 changed the title Feature Request: Default icon Feature Request: Default window/tray icon from toml Jan 20, 2025
@ealmloff ealmloff added desktop Suggestions related to the desktop renderer cli Related to the dioxus-cli program consistency improve cohesiveness of features labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the dioxus-cli program consistency improve cohesiveness of features desktop Suggestions related to the desktop renderer
Projects
None yet
Development

No branches or pull requests

2 participants