migrate ui crate to new theme tokens

This commit is contained in:
2026-10-09 10:43:46 +07:00
parent 90377c8c76
commit 5c15b0e840
27 changed files with 292 additions and 235 deletions
+4 -4
View File
@@ -1,10 +1,10 @@
use gpui::prelude::FluentBuilder;
use gpui::{
App, AppContext, Context, Entity, IntoElement, ParentElement, Render, SharedString, Styled,
Window, relative,
Window, px, relative,
};
use gpui_base::Tooltip as BaseTooltip;
use theme::ActiveTheme;
use theme::{ActiveTheme, control_radius};
pub struct Tooltip {
text: SharedString,
@@ -24,9 +24,9 @@ impl Render for Tooltip {
.p_1p5()
.border_1()
.border_color(cx.theme().border)
.bg(cx.theme().surface_background)
.bg(cx.theme().surface_overlay)
.when(cx.theme().shadow, |this| this.shadow_sm())
.rounded(cx.theme().radius)
.rounded(px(control_radius()))
.text_xs()
.text_color(cx.theme().text)
.line_height(relative(1.25))