Simplify usage of tooltip
Now you simply specify a text, an action and a style and GPUI will take of rendering it properly. This is simpler compared to always providing a custom element and should make tooltip more consistent across the UI.
This commit is contained in:
parent
9ca9f63046
commit
cc028cca78
5 changed files with 99 additions and 35 deletions
|
@ -2,7 +2,7 @@ mod theme_registry;
|
|||
|
||||
use gpui::{
|
||||
color::Color,
|
||||
elements::{ContainerStyle, ImageStyle, LabelStyle},
|
||||
elements::{ContainerStyle, ImageStyle, LabelStyle, TooltipStyle},
|
||||
fonts::{HighlightStyle, TextStyle},
|
||||
Border, MouseState,
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ pub struct Theme {
|
|||
pub project_diagnostics: ProjectDiagnostics,
|
||||
pub breadcrumbs: ContainedText,
|
||||
pub contact_notification: ContactNotification,
|
||||
pub tooltip: ContainedText,
|
||||
pub tooltip: TooltipStyle,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue