refactor(ui): use pin for anchored overlays

This commit is contained in:
Hakan Seven committed 2026-07-28 01:25:39 +03:00
1 parent b9de8940bc
commit ce1091cea5
5 files changed
+51 -98

No files matched your search

+1 -12
View File
@@ -9,18 +9,7 @@ pub(super) fn position_canvas_overlay<'a>(
anchor: iced::Point,
panel: Element<'a, Message>,
) -> Element<'a, Message> {
let ax = anchor.x.max(0.0);
let ay = anchor.y.max(0.0);
column![
Space::new().height(iced::Length::Fixed(ay)),
row![
Space::new().width(iced::Length::Fixed(ax)),
iced::widget::opaque(panel),
],
]
.width(Fill)
.height(Fill)
.into()
crate::ui::pin_at(anchor, iced::widget::opaque(panel))
}
// ── In-place MText editor overlay ───────────────────────────────────────────