add option for undecorated_shadow on windows (#2285)
* add option for undecorated_shadow on windows * formated
This commit is contained in:
parent
6009420b57
commit
d1ceada119
2 changed files with 11 additions and 0 deletions
|
|
@ -8,6 +8,12 @@ pub struct PlatformSpecific {
|
||||||
|
|
||||||
/// Whether show or hide the window icon in the taskbar.
|
/// Whether show or hide the window icon in the taskbar.
|
||||||
pub skip_taskbar: bool,
|
pub skip_taskbar: bool,
|
||||||
|
|
||||||
|
/// Shows or hides the background drop shadow for undecorated windows.
|
||||||
|
///
|
||||||
|
/// The shadow is hidden by default.
|
||||||
|
/// Enabling the shadow causes a thin 1px line to appear on the top of the window.
|
||||||
|
pub undecorated_shadow: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for PlatformSpecific {
|
impl Default for PlatformSpecific {
|
||||||
|
|
@ -15,6 +21,7 @@ impl Default for PlatformSpecific {
|
||||||
Self {
|
Self {
|
||||||
drag_and_drop: true,
|
drag_and_drop: true,
|
||||||
skip_taskbar: false,
|
skip_taskbar: false,
|
||||||
|
undecorated_shadow: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,10 @@ pub fn window_attributes(
|
||||||
|
|
||||||
attributes = attributes
|
attributes = attributes
|
||||||
.with_skip_taskbar(settings.platform_specific.skip_taskbar);
|
.with_skip_taskbar(settings.platform_specific.skip_taskbar);
|
||||||
|
|
||||||
|
window_builder = window_builder.with_undecorated_shadow(
|
||||||
|
settings.platform_specific.undecorated_shadow,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue