- Fix executor.timer() in gpui2
- Add support for tooltips 

[[PR Description]]

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2023-11-06 10:51:01 -07:00 committed by GitHub
commit 3afdeeac1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 49 deletions

View file

@ -1,6 +1,4 @@
use gpui2::{
div, px, Div, ParentElement, Render, SharedString, Styled, View, ViewContext, VisualContext,
};
use gpui2::{div, px, Div, ParentElement, Render, SharedString, Styled, ViewContext};
use theme2::ActiveTheme;
#[derive(Clone, Debug)]
@ -12,10 +10,6 @@ impl TextTooltip {
pub fn new(str: SharedString) -> Self {
Self { title: str }
}
pub fn build_view<C: VisualContext>(str: SharedString, cx: &mut C) -> C::Result<View<Self>> {
cx.build_view(|cx| TextTooltip::new(str))
}
}
impl Render for TextTooltip {
@ -27,6 +21,7 @@ impl Render for TextTooltip {
.bg(theme.colors().background)
.rounded(px(8.))
.border()
.font("Zed Sans")
.border_color(theme.colors().border)
.text_color(theme.colors().text)
.pl_2()