widgets: update policycheck_view
* update margins * add widget IDs * experimental inclusion of a progress bar Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -30,6 +30,7 @@ widget!(
|
|||||||
impl Template for PolicyCheckView {
|
impl Template for PolicyCheckView {
|
||||||
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
|
fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self {
|
||||||
let policy_check_menu_text_block = TextBlock::new()
|
let policy_check_menu_text_block = TextBlock::new()
|
||||||
|
.id(ID_POLICY_CHECK_TEXT_BLOCK_MENU)
|
||||||
.foreground("#3b434a")
|
.foreground("#3b434a")
|
||||||
.text("Help Menu")
|
.text("Help Menu")
|
||||||
.v_align("center")
|
.v_align("center")
|
||||||
@@ -188,16 +189,19 @@ impl Template for PolicyCheckView {
|
|||||||
ctx.get_mut::<PolicyCheckState>(id)
|
ctx.get_mut::<PolicyCheckState>(id)
|
||||||
.action(Action::ParseEntry(entity));
|
.action(Action::ParseEntry(entity));
|
||||||
})
|
})
|
||||||
.on_changed(move |ctx, entity| {
|
//.on_changed(move |ctx, entity| {
|
||||||
// Element value has changed
|
// ctx.get_mut::<PolicyCheckState>(id)
|
||||||
ctx.get_mut::<PolicyCheckState>(id)
|
// .action(Action::SetPopupBox(entity));
|
||||||
.action(Action::InputTextChanged(entity));
|
// ctx.get_mut::<PolicyCheckState>(id)
|
||||||
ctx.get_mut::<PolicyCheckState>(id)
|
// .action(Action::AddProgress(0.5));
|
||||||
.action(Action::SetVisibility(entity));
|
// ctx.get_mut::<PolicyCheckState>(id)
|
||||||
//ctx.get_widget(policy_check_label_policy_number).set("visible");
|
// .action(Action::InputTextChanged(entity));
|
||||||
// ctx.get_mut::<PolicyCheckState>(id)
|
// ctx.get_mut::<PolicyCheckState>(id)
|
||||||
// .action(Action::SetVisility(entity));
|
// .action(Action::SetVisibility(entity));
|
||||||
})
|
// //ctx.get_widget(policy_check_label_policy_number).set("visible");
|
||||||
|
// // ctx.get_mut::<PolicyCheckState>(id)
|
||||||
|
// // .action(Action::SetVisility(entity));
|
||||||
|
//})
|
||||||
// .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| {
|
// .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| {
|
||||||
// state(id, states).action(Action::AddItem);
|
// state(id, states).action(Action::AddItem);
|
||||||
// })
|
// })
|
||||||
|
|||||||
Reference in New Issue
Block a user