web-view
web-view copied to clipboard
Change app icon on linux system?
I can't figure out how to do this. I'm talking about the titlebar and taskbar default icon, when running the binary directly instead of using a desktop file.
Eg https://gtk-rs.org/docs/gtk/trait.GtkWindowExt.html#tymethod.set_icon_from_file for GTK without using web-view - any way to access this? Would I import the whole gtk and call that function?
On Windows one can use the winres crate. Linux binaries do not have an icon embedded, instead a DesktopEntry is used. For showing an icon in the titlebar, you would need to do it like with gtk in C (I think you will need to modify the crate, because gtk-rs does not help, as the bindings are in C...).
A desktop entry is used for showing the icon that you click but upon clicking it, a pixmap is still shown in the titlebar. I will try to find the relevant parts, add a change_icon method, and create a PR. Where would I add my gtk_window_set_icon_from_file()
call in https://github.com/Boscop/web-view/blob/master/webview-sys/gtk.rs ?