various_widgets: add visibility test, minor refactoring
This commit is contained in:
@@ -96,7 +96,7 @@ impl Event {
|
||||
#[derive(Default)]
|
||||
pub struct EventAlterables {
|
||||
pub dirty_nodes: Vec<taffy::NodeId>,
|
||||
pub style_set_requests: Vec<(taffy::NodeId, taffy::Style)>,
|
||||
pub style_set_requests: Vec<(WidgetID, taffy::Style)>,
|
||||
pub animations: Vec<animation::Animation>,
|
||||
pub widgets_to_tick: HashSet<WidgetID>, // widgets which needs to be ticked in the next `Layout::update()` fn
|
||||
pub transform_stack: TransformStack,
|
||||
@@ -112,8 +112,8 @@ impl EventAlterables {
|
||||
self.needs_redraw = true;
|
||||
}
|
||||
|
||||
pub fn set_style(&mut self, node_id: taffy::NodeId, style: taffy::Style) {
|
||||
self.style_set_requests.push((node_id, style));
|
||||
pub fn set_style(&mut self, widget_id: WidgetID, style: taffy::Style) {
|
||||
self.style_set_requests.push((widget_id, style));
|
||||
}
|
||||
|
||||
pub fn mark_dirty(&mut self, node_id: taffy::NodeId) {
|
||||
|
||||
Reference in New Issue
Block a user