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
@@ -13,7 +13,7 @@ use gpui::{
point, uniform_list,
};
use gpui_native_core::scrollbar::{Scrollbar, ScrollbarHandle, ScrollbarVisibility};
use gpui_native_theme::{ActiveTheme as _, MONO_ADVANCE_RATIO};
use gpui_native_theme::{ActiveTheme as _, BORDER_WIDTH, MONO_ADVANCE_RATIO};
use similar::{Change, ChangeTag, TextDiff};
use std::ops::Range;
@@ -535,7 +535,7 @@ fn render_row(
row_element.child(
div()
.flex_none()
.border_l_4()
.border_l(BORDER_WIDTH * 4.0)
.border_color(gpui::transparent_black()),
)
},
@@ -661,7 +661,9 @@ fn render_row(
_ => wash_strong(change_color),
})
.when(options.indicators == DiffIndicators::Bars, |number| {
number.border_l_4().border_color(change_color)
number
.border_l(BORDER_WIDTH * 4.0)
.border_color(change_color)
}),
)
})
@@ -672,7 +674,7 @@ fn render_row(
div()
.h_full()
.flex_none()
.border_l_4()
.border_l(BORDER_WIDTH * 4.0)
.border_color(change_color),
)
},