Add option to enable/disable WS_CLIPCHILDREN window style (#3212)
This commit is contained in:
parent
0cc19716f3
commit
10a785019c
5 changed files with 22 additions and 1 deletions
|
|
@ -315,6 +315,9 @@ pub trait WindowBuilderExtWindows {
|
|||
/// Enabling the shadow causes a thin 1px line to appear on the top of the window.
|
||||
fn with_undecorated_shadow(self, shadow: bool) -> Self;
|
||||
|
||||
/// This sets or removes `WS_CLIPCHILDREN` style.
|
||||
fn with_clip_children(self, flag: bool) -> Self;
|
||||
|
||||
/// Sets the color of the window border.
|
||||
///
|
||||
/// Supported starting with Windows 11 Build 22000.
|
||||
|
|
@ -385,6 +388,12 @@ impl WindowBuilderExtWindows for WindowBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_clip_children(mut self, flag: bool) -> Self {
|
||||
self.window.platform_specific.clip_children = flag;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_border_color(mut self, color: Option<Color>) -> Self {
|
||||
self.window.platform_specific.border_color = Some(color.unwrap_or(Color::NONE));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue