popup fixes and clock gets nicer popup

This commit is contained in:
2026-09-15 11:46:16 +01:00
parent fb6b03b369
commit ac70a9133a
7 changed files with 87 additions and 63 deletions
+10 -2
View File
@@ -2,16 +2,24 @@ use iced::{window, Rectangle};
use crate::Wire;
#[derive(Clone, Debug)]
pub struct PopupSettings {
// pub name: String,
pub module_id: String,
pub element_id: String,
pub gap: i32,
}
/// What a module asks the app to do — the single effect vocabulary shared by
/// modules and app, so mapping module output into a `Message` is a plain
/// `.map(Message::Effect)` with no mirror enum.
#[derive(Debug, Clone)]
pub enum ModuleEffect {
/// Toggle a popup for the given module id (element id anchors it).
RequestPopup(String, String),
RequestPopup(PopupSettings),
/// A widget-tree pass reported a module's laid-out bounds; anchor the
/// popup there. App-internal, but one effect type keeps routing trivial.
BoundsFound(String, Rectangle),
BoundsFound(Rectangle, PopupSettings),
/// Request removal of the popup surface.
ClosePopup(window::Id),
/// Route a wire to its target (a module, a service inbox, or a topic).