feat: popup reposition

This commit is contained in:
Ashley Wulber 2026-06-25 15:25:36 -04:00 committed by Ashley Wulber
parent da9d15b2e8
commit 633ed14411
3 changed files with 79 additions and 13 deletions

View file

@ -124,26 +124,34 @@ pub enum Action {
/// height
height: u32,
},
/// set the size of the popup
Reposition {
/// id of the popup
id: Id,
/// positioner of the popup
positioner: SctkPositioner,
},
}
impl fmt::Debug for Action {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Action::Popup { popup, .. } => write!(
f,
"Action::PopupAction::Popup {{ popup: {:?} }}",
popup
),
Action::Destroy { id } => write!(
f,
"Action::PopupAction::Destroy {{ id: {:?} }}",
id
),
Action::Popup { popup, .. } => {
write!(f, "Action::PopupAction::Popup {{ popup: {:?} }}", popup)
}
Action::Destroy { id } => {
write!(f, "Action::PopupAction::Destroy {{ id: {:?} }}", id)
}
Action::Size { id, width, height } => write!(
f,
"Action::PopupAction::Size {{ id: {:?}, width: {:?}, height: {:?} }}",
id, width, height
),
Action::Reposition { id, positioner } => write!(
f,
"Action::Reposition {{ id: {:?}, positioner: {:?} }}",
id, positioner
),
}
}
}