Use shared theme tokens across components

- Replace remaining raw component metrics with theme constants.
- Share disabled opacity, focus ring alpha, and code line height.
- Route editor borders, weights, and links through the theme.
- Align tab, alert, toast, panel, and resize spacing.
This commit is contained in:
2026-11-16 18:35:00 +07:00
parent 9e61147ca9
commit 1dafa87bef
27 changed files with 136 additions and 89 deletions
+6 -4
View File
@@ -8,7 +8,9 @@ use gpui::{
ease_out_quint,
};
use gpui_native_icons::{Icon, IconRole};
use gpui_native_theme::{ActiveTheme as _, ENTER_SLIDE_DISTANCE, Size, TextRole, Typeset as _};
use gpui_native_theme::{
ALERT_STACK_WIDTH, ActiveTheme as _, ENTER_SLIDE_DISTANCE, Size, TextRole, Typeset as _,
};
use gpui_native_utils::ResultLogErr as _;
use crate::button::{Button, ButtonVariant};
@@ -234,7 +236,7 @@ impl RenderOnce for Alert {
.items_start()
.gap_3()
.px_3()
.py_2p5()
.py_2()
.when_some(self.icon.clone(), |alert, icon_glyph| {
alert.child(
div()
@@ -242,7 +244,7 @@ impl RenderOnce for Alert {
.flex()
.items_center()
.justify_center()
.size_6()
.size(theme.sizes.small.avatar_size)
.rounded(theme.radius.full)
.bg(ramp.base)
.child(icon_glyph.size(dense_icon_size).color(ramp.foreground)),
@@ -370,7 +372,7 @@ impl RenderOnce for AlertsView {
.absolute()
.top_4()
.right_4()
.w_80()
.w(ALERT_STACK_WIDTH)
.flex()
.flex_col()
.items_end()