edit overlay progress
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use crate::{
|
||||
components::{Component, button, tooltip},
|
||||
components::{button, tooltip, Component},
|
||||
drawing::Color,
|
||||
i18n::Translation,
|
||||
layout::WidgetID,
|
||||
parser::{
|
||||
AttribPair, ParserContext, ParserFile, parse_check_f32, parse_children, print_invalid_attrib, process_component,
|
||||
parse_check_f32, parse_check_i32, parse_children, print_invalid_attrib, process_component,
|
||||
style::{parse_color_opt, parse_round, parse_style, parse_text_style},
|
||||
AttribPair, ParserContext, ParserFile,
|
||||
},
|
||||
widget::util::WLength,
|
||||
};
|
||||
@@ -25,6 +26,7 @@ pub fn parse_component_button<'a>(
|
||||
let mut round = WLength::Units(4.0);
|
||||
let mut tooltip: Option<String> = None;
|
||||
let mut tooltip_side: Option<tooltip::TooltipSide> = None;
|
||||
let mut sticky: bool = false;
|
||||
|
||||
let mut translation: Option<Translation> = None;
|
||||
|
||||
@@ -71,6 +73,10 @@ pub fn parse_component_button<'a>(
|
||||
}
|
||||
}
|
||||
}
|
||||
"sticky" => {
|
||||
let mut sticky_i32 = 0;
|
||||
sticky = parse_check_i32(value, &mut sticky_i32) && sticky_i32 == 1;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +97,7 @@ pub fn parse_component_button<'a>(
|
||||
side: tooltip_side.map_or(tooltip::TooltipSide::Bottom, |f| f),
|
||||
text: Translation::from_translation_key(&t),
|
||||
}),
|
||||
sticky,
|
||||
},
|
||||
)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user