From 0f97202fbb68db02b9f1c432bf621ab417c8cee1 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Wed, 22 Jul 2020 18:08:16 +0200 Subject: [PATCH] widgets: policycheck_menu: update styling * not used, since menu is dynamically created via function Signed-off-by: Ralf Zerres --- advotracker/src/widgets/policycheck_menu.rs | 60 +++++---------------- 1 file changed, 12 insertions(+), 48 deletions(-) diff --git a/advotracker/src/widgets/policycheck_menu.rs b/advotracker/src/widgets/policycheck_menu.rs index ba7cbc7..084a20a 100644 --- a/advotracker/src/widgets/policycheck_menu.rs +++ b/advotracker/src/widgets/policycheck_menu.rs @@ -6,17 +6,12 @@ */ use orbtk::prelude::*; -//use orbtk::theme::vector_graphics::material_icons_font; use crate::data::constants::*; -//pub struct PolicyMenu { -// pub isvalid: bool -//} - widget!( PolicyCheckMenu { - isvalid: String + is_active: Bool } ); @@ -51,56 +46,25 @@ impl Template for PolicyCheckMenu { self.name("PolicyCheckMenu").child( Stack::new() + .id(ID_POLICY_CHECK_MENU) .orientation("vertical") - .spacing(8.0) + .spacing(8) .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), - ) + Button::new() + .icon(material_icons_font::MD_VERIFIED_USER) + .text("angemeldeter Benutzer") + .margin((0, 8, 0, 0)) .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), - ) + Button::new() + .icon(material_icons_font::MD_EXIT_TO_APP) + .text("Quit") + .margin((0, 8, 0, 0)) .build(ctx), ) - .build(ctx) + .build(ctx), ) } }