diff options
author | 2020-08-17 15:38:02 +0700 | |
---|---|---|
committer | 2020-08-17 15:42:50 +0700 | |
commit | a490fd54c9b262c9d8ac946f75a0016fbb81848b (patch) | |
tree | 1c11e7b793abb0615d32d1e2cc576c238e1de2f4 /src/window | |
parent | 00d66da0cee1dc7faeccc5b3f0794a0393a38da7 (diff) | |
download | iced-a490fd54c9b262c9d8ac946f75a0016fbb81848b.tar.gz iced-a490fd54c9b262c9d8ac946f75a0016fbb81848b.tar.bz2 iced-a490fd54c9b262c9d8ac946f75a0016fbb81848b.zip |
Add 'transparent' in window setting
Diffstat (limited to 'src/window')
-rw-r--r-- | src/window/settings.rs | 5 |
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(), } |