* not used, since menu is dynamically created via function Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
71 lines
2.1 KiB
Rust
71 lines
2.1 KiB
Rust
/*
|
|
* advotracker - Hotline tackingtool for Advocats
|
|
*
|
|
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de>
|
|
* SPDX-License-Identifier: (0BSD or MIT)
|
|
*/
|
|
|
|
use orbtk::prelude::*;
|
|
|
|
use crate::data::constants::*;
|
|
|
|
widget!(
|
|
PolicyCheckMenu {
|
|
is_active: Bool
|
|
}
|
|
);
|
|
|
|
|
|
impl Template for PolicyCheckMenu {
|
|
fn template(self, _id: Entity, ctx: &mut BuildContext) -> Self {
|
|
// let policy_check_menu_container = Container::new()
|
|
// .id(ID_POLICY_CHECK_MENU_CONTAINER)
|
|
// .class(CLASS_MENU)
|
|
// .attach(Grid::row(3))
|
|
// .attach(Grid::column(8))
|
|
// .margin((0.0, 0.0, 4.0, 0.0))
|
|
// .enabled(false)
|
|
// .min_size(120.0, 180.0)
|
|
// .v_align("center")
|
|
// .on_click(move |ctx, _| {
|
|
// ctx.get_mut::<PolicyCheckState>(id)
|
|
// .action(Action::NewEntry(quit));
|
|
// true
|
|
// })
|
|
// .build(ctx);
|
|
|
|
// let policycheck_menu_container = Container::new()
|
|
// .id(ID_POLICY_CHECK_MENU_CONTAINER)
|
|
// .background("#dfebf5")
|
|
// .width(200.0)
|
|
// .height(200.0)
|
|
// .child(
|
|
|
|
// The menu implemented as an overlay
|
|
//ctx.append_child_to_overlay(policy_check_menu_button).unwrap();
|
|
|
|
self.name("PolicyCheckMenu").child(
|
|
Stack::new()
|
|
.id(ID_POLICY_CHECK_MENU)
|
|
.orientation("vertical")
|
|
.spacing(8)
|
|
.h_align("center")
|
|
.child(
|
|
Button::new()
|
|
.icon(material_icons_font::MD_VERIFIED_USER)
|
|
.text("angemeldeter Benutzer")
|
|
.margin((0, 8, 0, 0))
|
|
.build(ctx),
|
|
)
|
|
.child(
|
|
Button::new()
|
|
.icon(material_icons_font::MD_EXIT_TO_APP)
|
|
.text("Quit")
|
|
.margin((0, 8, 0, 0))
|
|
.build(ctx),
|
|
)
|
|
.build(ctx),
|
|
)
|
|
}
|
|
}
|