summaryrefslogtreecommitdiffstats
path: root/winit
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 /winit
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--winit/src/settings.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/winit/src/settings.rs b/winit/src/settings.rs
index 4155bf7d..92541e7d 100644
--- a/winit/src/settings.rs
+++ b/winit/src/settings.rs
@@ -45,6 +45,9 @@ pub struct Window {
/// Whether the window should have a border, a title bar, etc.
pub decorations: bool,
+ /// Whether the window should be transparent
+ pub transparent: bool,
+
/// The window icon, which is also usually used in the taskbar
pub icon: Option<winit::window::Icon>,
@@ -69,6 +72,7 @@ impl Window {
.with_inner_size(winit::dpi::LogicalSize { width, height })
.with_resizable(self.resizable)
.with_decorations(self.decorations)
+ .with_transparent(self.transparent)
.with_window_icon(self.icon)
.with_fullscreen(conversion::fullscreen(primary_monitor, mode));
@@ -103,6 +107,7 @@ impl Default for Window {
max_size: None,
resizable: true,
decorations: true,
+ transparent: false,
icon: None,
platform_specific: Default::default(),
}