Merge pull request #3128 from B0ney/feat/windows_corner_preference
Add `CornerPreference` window setting for Windows
This commit is contained in:
commit
fdafe509c4
3 changed files with 52 additions and 2 deletions
|
|
@ -91,7 +91,10 @@ pub fn window_attributes(
|
|||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use winit::platform::windows::WindowAttributesExtWindows;
|
||||
use window::settings::platform;
|
||||
use winit::platform::windows::{
|
||||
CornerPreference, WindowAttributesExtWindows,
|
||||
};
|
||||
|
||||
attributes = attributes
|
||||
.with_drag_and_drop(settings.platform_specific.drag_and_drop);
|
||||
|
|
@ -102,6 +105,21 @@ pub fn window_attributes(
|
|||
attributes = attributes.with_undecorated_shadow(
|
||||
settings.platform_specific.undecorated_shadow,
|
||||
);
|
||||
|
||||
attributes = attributes.with_corner_preference(
|
||||
match settings.platform_specific.corner_preference {
|
||||
platform::CornerPreference::Default => {
|
||||
CornerPreference::Default
|
||||
}
|
||||
platform::CornerPreference::DoNotRound => {
|
||||
CornerPreference::DoNotRound
|
||||
}
|
||||
platform::CornerPreference::Round => CornerPreference::Round,
|
||||
platform::CornerPreference::RoundSmall => {
|
||||
CornerPreference::RoundSmall
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue