pub fn active_value() -> impl Widget<AppData> {
    Label::dynamic(|d: &AppData, _| match d.active_textbox {
        None => "No textfield is active".to_string(),
        Some(id) => match id {
            DOLLAR_ERROR_WIDGET => format!("Active value: {:2}", d.dollars),
            EURO_ERROR_WIDGET => format!("Active value: {:2}", d.euros),
            POUND_ERROR_WIDGET => format!("Active value: {:2}", d.pounds),
            POSTAL_ERROR_WIDGET => format!("Active value: {}", d.postal_code),
            CAT_ERROR_WIDGET => format!("Active value: {}", d.dont_type_cat),
            _ => unreachable!(),
        },
    })
    .with_text_color(druid::theme::FOREGROUND_DARK)
    .with_font(druid::theme::UI_FONT_ITALIC)
}
/// Create the 'active value' widget
Create the 'active value' widget
Create the ' active value ' widget
pub fn active_value() -> impl Widget<AppData> {
    Label::dynamic(|d: &AppData, _| match d.active_textbox {
        None => "No textfield is active".to_string(),
        Some(id) => match id {
            DOLLAR_ERROR_WIDGET => format!("Active value: {:2}", d.dollars),
            EURO_ERROR_WIDGET => format!("Active value: {:2}", d.euros),
            POUND_ERROR_WIDGET => format!("Active value: {:2}", d.pounds),
            POSTAL_ERROR_WIDGET => format!("Active value: {}", d.postal_code),
            CAT_ERROR_WIDGET => format!("Active value: {}", d.dont_type_cat),
            _ => unreachable!(),
        },
    })
    .with_text_color(druid::theme::FOREGROUND_DARK)
    .with_font(druid::theme::UI_FONT_ITALIC)
}
pub fn active_value ( ) -> impl Widget < AppData > { Label :: dynamic ( | d : & AppData , _ | match d . active_textbox { None => " " . to_string ( ) , Some ( id ) => match id { DOLLAR_ERROR_WIDGET => format ! ( " " d dollars ) , EURO_ERROR_WIDGET => format ! ( " " d euros ) , POUND_ERROR_WIDGET => format ! ( " " d pounds ) , POSTAL_ERROR_WIDGET => format ! ( " " d postal_code ) , CAT_ERROR_WIDGET => format ! ( " " d dont_type_cat ) , _ => unreachable ! ( ) , } , } ) . with_text_color ( druid :: theme :: FOREGROUND_DARK ) . with_font ( druid :: theme :: UI_FONT_ITALIC ) }
Create the 'active value' widget
Create the ' active value ' widget