frontend: policycheck_menu
* orbtk code to handle a menu structure Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
72
frontend/src/policycheck_menu.rs
Normal file
72
frontend/src/policycheck_menu.rs
Normal file
@@ -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)
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user