feat(Windows): add skip taskbar methods (#2177)
This commit is contained in:
parent
52c4670237
commit
ab1f636960
5 changed files with 88 additions and 14 deletions
|
|
@ -140,6 +140,9 @@ pub trait WindowExtWindows {
|
|||
|
||||
/// Returns the current window theme.
|
||||
fn theme(&self) -> Theme;
|
||||
|
||||
/// Whether to show or hide the window icon in the taskbar.
|
||||
fn set_skip_taskbar(&self, skip: bool);
|
||||
}
|
||||
|
||||
impl WindowExtWindows for Window {
|
||||
|
|
@ -167,6 +170,11 @@ impl WindowExtWindows for Window {
|
|||
fn theme(&self) -> Theme {
|
||||
self.window.theme()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn set_skip_taskbar(&self, skip: bool) {
|
||||
self.window.set_skip_taskbar(skip)
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `WindowBuilder` that are specific to Windows.
|
||||
|
|
@ -218,6 +226,9 @@ pub trait WindowBuilderExtWindows {
|
|||
|
||||
/// Forces a theme or uses the system settings if `None` was provided.
|
||||
fn with_theme(self, theme: Option<Theme>) -> WindowBuilder;
|
||||
|
||||
/// Whether show or hide the window icon in the taskbar.
|
||||
fn with_skip_taskbar(self, skip: bool) -> WindowBuilder;
|
||||
}
|
||||
|
||||
impl WindowBuilderExtWindows for WindowBuilder {
|
||||
|
|
@ -262,6 +273,12 @@ impl WindowBuilderExtWindows for WindowBuilder {
|
|||
self.platform_specific.preferred_theme = theme;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_skip_taskbar(mut self, skip: bool) -> WindowBuilder {
|
||||
self.platform_specific.skip_taskbar = skip;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `MonitorHandle` that are specific to Windows.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue