From a593f866efb25d149065b11714bb954c26d34cec Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 27 Feb 2024 10:52:33 -0700 Subject: [PATCH] Set resize border for winit apps --- src/app/mod.rs | 4 ++-- src/widget/popover.rs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 30077584..1e1cf8dc 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -117,8 +117,8 @@ pub(crate) fn iced_settings( #[cfg(not(feature = "wayland"))] { - if let Some(_border_size) = settings.resizable { - // iced.window.border_size = border_size as u32; + if let Some(border_size) = settings.resizable { + iced.window.resize_border = border_size as u32; iced.window.resizable = true; } iced.window.decorations = !settings.client_decorations; diff --git a/src/widget/popover.rs b/src/widget/popover.rs index e6b611ae..a02280bf 100644 --- a/src/widget/popover.rs +++ b/src/widget/popover.rs @@ -182,10 +182,9 @@ where bounds.x + bounds.width / 2.0, bounds.y + bounds.height / 2.0, ), - Position::Bottom => Point::new( - bounds.x + bounds.width / 2.0, - bounds.y + bounds.height, - ), + Position::Bottom => { + Point::new(bounds.x + bounds.width / 2.0, bounds.y + bounds.height) + } Position::Point(relative) => { bounds.position() + Vector::new(relative.x, relative.y) }