use dioxus::{
desktop::{tao::window::Icon, LogicalSize, WindowBuilder},
prelude::*,
};
fn main() {
// Init logger
dioxus_logger::init(Level::INFO).expect("failed to init logger");
let icon = Icon::from_rgba(include_bytes!("../assets/icons/32x32.png").to_vec(), 32, 32)
.expect("image parse failed");
let cfg = dioxus::desktop::Config::new().with_window(
WindowBuilder::new()
.with_window_icon(Some(icon))
.with_title("Ledgedash")
.with_inner_size(LogicalSize::new(800, 700)),
);
LaunchBuilder::desktop().with_cfg(cfg).launch(App);
}
See attached for backtrace. I generated the icon according to the tauri instructions (https://tauri.app/v1/guides/features/icons/#command-usage). Also the from_rgba returns an Ok, so I don't think it should be an issue with the icon itself (which is also attached).
I've been frustrating myself trying to get this to work, and I think it's fair to say the documentation for icons isn't great. There's also a Config::with_icon() function that I tried using, but it had no effect. I don't know if I should be using manganis for the icon or not. I don't know if the icon needs to be setup in the Dioxus.toml [bundle] config. Any help would be appreciated