Skip to repository content18 lines · 638 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T04:45:34.016Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
visible_on_hover.rs
1use gpui::{InteractiveElement, SharedString, Styled};
2
3/// A trait for elements that can be made visible on hover by
4/// tracking a specific group.
5pub trait VisibleOnHover {
6 /// Sets the element to only be visible when the specified group is hovered.
7 ///
8 /// Pass `""` as the `group_name` to use the global group.
9 fn visible_on_hover(self, group_name: impl Into<SharedString>) -> Self;
10}
11
12impl<E: InteractiveElement + Styled> VisibleOnHover for E {
13 fn visible_on_hover(self, group_name: impl Into<SharedString>) -> Self {
14 self.invisible()
15 .group_hover(group_name, |style| style.visible())
16 }
17}
18