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:
Antonio Scandurra 2022-06-02 09:12:50 +02:00
parent 9ca9f63046
commit cc028cca78
5 changed files with 99 additions and 35 deletions

View file

@ -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)]