summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-08-18 20:30:35 +0200
committerLibravatar GitHub <noreply@github.com>2020-08-18 20:30:35 +0200
commit2a46ed87538b9617ffc82ce6c01d40bba15bd5b3 (patch)
tree6cf40a80e02e49a6a9034a41c020413077db878f /src
parent24297b11ee13dbe705b2fafa93643261560cbc45 (diff)
parent6de9a5e076889350a361899ca2356dddf5b1d18f (diff)
downloadiced-2a46ed87538b9617ffc82ce6c01d40bba15bd5b3.tar.gz
iced-2a46ed87538b9617ffc82ce6c01d40bba15bd5b3.tar.bz2
iced-2a46ed87538b9617ffc82ce6c01d40bba15bd5b3.zip
Merge pull request #484 from atsuzaki/window-transparent-setting
Add 'transparent' in window setting
Diffstat (limited to '')
-rw-r--r--src/window/settings.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window/settings.rs b/src/window/settings.rs
index 2046f2d9..7bc49ce1 100644
--- a/src/window/settings.rs
+++ b/src/window/settings.rs
@@ -18,6 +18,9 @@ pub struct Settings {
/// Whether the window should have a border, a title bar, etc. or not.
pub decorations: bool,
+ /// Whether the window should be transparent
+ pub transparent: bool,
+
/// The icon of the window.
pub icon: Option<Icon>,
}
@@ -30,6 +33,7 @@ impl Default for Settings {
max_size: None,
resizable: true,
decorations: true,
+ transparent: false,
icon: None,
}
}
@@ -44,6 +48,7 @@ impl From<Settings> for iced_winit::settings::Window {
max_size: settings.max_size,
resizable: settings.resizable,
decorations: settings.decorations,
+ transparent: settings.transparent,
icon: settings.icon.map(Icon::into),
platform_specific: Default::default(),
}