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:
parent
e7549877ef
commit
5a056ce051
9 changed files with 177 additions and 163 deletions
|
|
@ -92,7 +92,7 @@ pub struct Window {
|
|||
pub always_on_top: bool,
|
||||
|
||||
/// The window icon, which is also usually used in the taskbar
|
||||
pub icon: Option<winit::window::Icon>,
|
||||
pub icon: Option<crate::window::Icon>,
|
||||
|
||||
/// Platform specific settings.
|
||||
pub platform_specific: platform::PlatformSpecific,
|
||||
|
|
@ -134,8 +134,9 @@ impl Window {
|
|||
.with_resizable(self.resizable)
|
||||
.with_decorations(self.decorations)
|
||||
.with_transparent(self.transparent)
|
||||
.with_window_icon(self.icon)
|
||||
.with_always_on_top(self.always_on_top);
|
||||
.with_window_icon(self.icon.and_then(conversion::icon))
|
||||
.with_always_on_top(self.always_on_top)
|
||||
.with_visible(self.visible);
|
||||
|
||||
if let Some(position) = conversion::position(
|
||||
primary_monitor.as_ref(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue