diff --git a/frontend/src/policycheck_menu.rs b/frontend/src/policycheck_menu.rs new file mode 100644 index 0000000..c66c27d --- /dev/null +++ b/frontend/src/policycheck_menu.rs @@ -0,0 +1,72 @@ +use orbtk::prelude::*; +//use orbtk::theme::vector_graphics::material_icons_font; + +//use crate::keys::*; + +//pub struct PolicyMenu { +// pub isvalid: bool +//} + +widget!( + PolicyCheckMenu { + isvalid: String + } +); + +impl Template for PolicyCheckMenu { + fn template(self, _id: Entity, ctx: &mut BuildContext) -> Self { + self.name("PolicyCheckMenu").child( + Stack::new() + .orientation("vertical") + .spacing(8.0) + .h_align("center") + .child( + Stack::new() + .orientation("horizontal") + .spacing(4.0) + .h_align("start") + .child( + Button::new() + .element("button-user") + .icon("") + .min_width(32.0) + .max_width(32.0) + .build(ctx), + ) + .child( + TextBlock::new() + .element("menu-user") + .min_width(80.0) + .max_width(180.0) + .text("angemeldeter Benutzer") + .build(ctx), + ) + .build(ctx), + ) + .child( + Stack::new() + .orientation("horizontal") + .spacing(4.0) + .h_align("start") + .child( + Button::new() + .element("button-user") + .icon("") + .min_width(32.0) + .max_width(32.0) + .build(ctx), + ) + .child( + TextBlock::new() + .element("menu-quit") + .min_width(80.0) + .max_width(180.0) + .text("Quit") + .build(ctx), + ) + .build(ctx), + ) + .build(ctx) + ) + } +}