add action set icon while running (#1590)

* set windows icon live action

* change get icon to insto raw

* remove mobile docs

* format

* fix format

* add file methods to Icon

* Rename action to `ChangeIcon` and tidy up `Icon` modules

* Fix documentation of `icon::Error`

* Remove unnecessary `\` in `icon` documentation

* Remove `etc.` from `Icon` documentation

---------

Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
This commit is contained in:
Night_Hunter 2023-04-12 18:47:53 +12:00 committed by GitHub
parent e7549877ef
commit 5a056ce051
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 177 additions and 163 deletions

View file

@ -770,6 +770,9 @@ pub fn run_command<A, E>(
mode,
));
}
window::Action::ChangeIcon(icon) => {
window.set_window_icon(conversion::icon(icon))
}
window::Action::FetchMode(tag) => {
let mode = if window.is_visible().unwrap_or(true) {
conversion::mode(window.fullscreen())