From 193f2de7eafd177ce097b157313b1be8f7562215 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Fri, 10 Jul 2020 20:38:38 +0200 Subject: [PATCH] widgets: update policycheck_view * update margins * add widget IDs * experimental inclusion of a progress bar Signed-off-by: Ralf Zerres --- advotracker/src/widgets/policycheck_view.rs | 24 ++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/advotracker/src/widgets/policycheck_view.rs b/advotracker/src/widgets/policycheck_view.rs index bb2a58d..9eb6e84 100644 --- a/advotracker/src/widgets/policycheck_view.rs +++ b/advotracker/src/widgets/policycheck_view.rs @@ -30,6 +30,7 @@ widget!( impl Template for PolicyCheckView { fn template(self, id: Entity, ctx: &mut BuildContext<'_>) -> Self { let policy_check_menu_text_block = TextBlock::new() + .id(ID_POLICY_CHECK_TEXT_BLOCK_MENU) .foreground("#3b434a") .text("Help Menu") .v_align("center") @@ -188,16 +189,19 @@ impl Template for PolicyCheckView { ctx.get_mut::(id) .action(Action::ParseEntry(entity)); }) - .on_changed(move |ctx, entity| { - // Element value has changed - ctx.get_mut::(id) - .action(Action::InputTextChanged(entity)); - ctx.get_mut::(id) - .action(Action::SetVisibility(entity)); - //ctx.get_widget(policy_check_label_policy_number).set("visible"); - // ctx.get_mut::(id) - // .action(Action::SetVisility(entity)); - }) + //.on_changed(move |ctx, entity| { + // ctx.get_mut::(id) + // .action(Action::SetPopupBox(entity)); + // ctx.get_mut::(id) + // .action(Action::AddProgress(0.5)); + // ctx.get_mut::(id) + // .action(Action::InputTextChanged(entity)); + // ctx.get_mut::(id) + // .action(Action::SetVisibility(entity)); + // //ctx.get_widget(policy_check_label_policy_number).set("visible"); + // // ctx.get_mut::(id) + // // .action(Action::SetVisility(entity)); + //}) // .on_mouse_down | .on_mouse_move | .on_mouse_up (move |ctx, entity| { // state(id, states).action(Action::AddItem); // })