summaryrefslogtreecommitdiffstats
path: root/winit/src/settings.rs
diff options
context:
space:
mode:
authorLibravatar Night_Hunter <samuelhuntnz@gmail.com>2023-04-12 18:47:53 +1200
committerLibravatar GitHub <noreply@github.com>2023-04-12 06:47:53 +0000
commit5a056ce0510343621305474af74ade1db028c01a (patch)
tree424aa80f7151e594ebc5e38fb6445fa33e121ea1 /winit/src/settings.rs
parente7549877ef396471df1509bce2b1d85243206022 (diff)
downloadiced-5a056ce0510343621305474af74ade1db028c01a.tar.gz
iced-5a056ce0510343621305474af74ade1db028c01a.tar.bz2
iced-5a056ce0510343621305474af74ade1db028c01a.zip
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>
Diffstat (limited to '')
-rw-r--r--winit/src/settings.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/winit/src/settings.rs b/winit/src/settings.rs
index 78d58000..6658773d 100644
--- a/winit/src/settings.rs
+++ b/winit/src/settings.rs
@@ -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(),