Set resize border for winit apps

This commit is contained in:
Jeremy Soller 2024-02-27 10:52:33 -07:00
parent bc3e16619e
commit a593f866ef
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
2 changed files with 5 additions and 6 deletions

View file

@ -117,8 +117,8 @@ pub(crate) fn iced_settings<App: Application>(
#[cfg(not(feature = "wayland"))] #[cfg(not(feature = "wayland"))]
{ {
if let Some(_border_size) = settings.resizable { if let Some(border_size) = settings.resizable {
// iced.window.border_size = border_size as u32; iced.window.resize_border = border_size as u32;
iced.window.resizable = true; iced.window.resizable = true;
} }
iced.window.decorations = !settings.client_decorations; iced.window.decorations = !settings.client_decorations;

View file

@ -182,10 +182,9 @@ where
bounds.x + bounds.width / 2.0, bounds.x + bounds.width / 2.0,
bounds.y + bounds.height / 2.0, bounds.y + bounds.height / 2.0,
), ),
Position::Bottom => Point::new( Position::Bottom => {
bounds.x + bounds.width / 2.0, Point::new(bounds.x + bounds.width / 2.0, bounds.y + bounds.height)
bounds.y + bounds.height, }
),
Position::Point(relative) => { Position::Point(relative) => {
bounds.position() + Vector::new(relative.x, relative.y) bounds.position() + Vector::new(relative.x, relative.y)
} }