diff --git a/crates/gpui/src/elements/div.rs b/crates/gpui/src/elements/div.rs index c69878574046e1a40e5668c972faa5f873a00a79..6bfdbde10f9457df97eadb8e4c73355e7beb17ee 100644 --- a/crates/gpui/src/elements/div.rs +++ b/crates/gpui/src/elements/div.rs @@ -1167,36 +1167,36 @@ impl DivState { pub struct Interactivity { /// The element ID of the element pub element_id: Option, - key_context: Option, - focusable: bool, - tracked_focus_handle: Option, - scroll_handle: Option, - group: Option, + pub(crate) key_context: Option, + pub(crate) focusable: bool, + pub(crate) tracked_focus_handle: Option, + pub(crate) scroll_handle: Option, + pub(crate) group: Option, /// The base style of the element, before any modifications are applied /// by focus, active, etc. pub base_style: Box, - focus_style: Option>, - in_focus_style: Option>, - hover_style: Option>, - group_hover_style: Option, - active_style: Option>, - group_active_style: Option, - drag_over_styles: Vec<(TypeId, StyleRefinement)>, - group_drag_over_styles: Vec<(TypeId, GroupStyle)>, - mouse_down_listeners: Vec, - mouse_up_listeners: Vec, - mouse_move_listeners: Vec, - scroll_wheel_listeners: Vec, - key_down_listeners: Vec, - key_up_listeners: Vec, - action_listeners: Vec<(TypeId, ActionListener)>, - drop_listeners: Vec<(TypeId, DropListener)>, - can_drop_predicate: Option, - click_listeners: Vec, - drag_listener: Option<(Box, DragListener)>, - hover_listener: Option>, - tooltip_builder: Option, - block_mouse: bool, + pub(crate) focus_style: Option>, + pub(crate) in_focus_style: Option>, + pub(crate) hover_style: Option>, + pub(crate) group_hover_style: Option, + pub(crate) active_style: Option>, + pub(crate) group_active_style: Option, + pub(crate) drag_over_styles: Vec<(TypeId, StyleRefinement)>, + pub(crate) group_drag_over_styles: Vec<(TypeId, GroupStyle)>, + pub(crate) mouse_down_listeners: Vec, + pub(crate) mouse_up_listeners: Vec, + pub(crate) mouse_move_listeners: Vec, + pub(crate) scroll_wheel_listeners: Vec, + pub(crate) key_down_listeners: Vec, + pub(crate) key_up_listeners: Vec, + pub(crate) action_listeners: Vec<(TypeId, ActionListener)>, + pub(crate) drop_listeners: Vec<(TypeId, DropListener)>, + pub(crate) can_drop_predicate: Option, + pub(crate) click_listeners: Vec, + pub(crate) drag_listener: Option<(Box, DragListener)>, + pub(crate) hover_listener: Option>, + pub(crate) tooltip_builder: Option, + pub(crate) block_mouse: bool, #[cfg(debug_assertions)] pub(crate) location: Option>, @@ -2061,7 +2061,8 @@ impl GroupBounds { /// A wrapper around an element that can be focused. pub struct Focusable { - pub(crate) element: E, + /// The element that is focusable + pub element: E, } impl FocusableElement for Focusable {} diff --git a/crates/gpui/src/elements/text.rs b/crates/gpui/src/elements/text.rs index 8ab847bf6b6911499aca5457243ac1ec2f8690db..37736f7f93c8e373ad557d2a98cd8ec898ae475c 100644 --- a/crates/gpui/src/elements/text.rs +++ b/crates/gpui/src/elements/text.rs @@ -489,7 +489,7 @@ impl Element for InteractiveText { move |mut cx| async move { cx.background_executor().timer(TOOLTIP_DELAY).await; - cx.update(|_, cx| { + cx.update(|cx| { let new_tooltip = tooltip_builder(position, cx).map(|tooltip| ActiveTooltip { tooltip: Some(AnyTooltip {