core: use typography roles for text styling

This commit is contained in:
2026-11-12 19:09:51 +07:00
parent 9528dcc54e
commit e2ec1fa7c2
6 changed files with 25 additions and 36 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ use gpui::{
Styled as _, Window, div,
};
use gpui_native_icons::Icon;
use gpui_native_theme::ActiveTheme as _;
use gpui_native_theme::{ActiveTheme as _, TextRole, Typeset as _};
use gpui_native_utils::{nav_key, paint_selectable_row, selectable_label_color};
/// The change reporter, fired with the next selection by pointer and keys.
@@ -243,7 +243,7 @@ impl ListItem {
row.child(
div()
.flex_none()
.text_sm()
.typeset(TextRole::Subheadline, cx)
.text_color(if selected {
theme.colors.primary_foreground
} else {
+3 -4
View File
@@ -12,7 +12,7 @@ use gpui::{
Styled as _, Window, div,
};
use gpui_native_core::scroll_area::ScrollArea;
use gpui_native_theme::ActiveTheme as _;
use gpui_native_theme::{ActiveTheme as _, TextRole, Typeset as _};
use gpui_native_utils::{nav_key, paint_selectable_row, selectable_label_color};
/// The change reporter, fired with the next selected row by pointer and keys.
@@ -407,8 +407,7 @@ impl SidebarEntry {
.px_2()
.pt_2()
.pb_1()
.text_sm()
.font_weight(gpui::FontWeight::MEDIUM)
.typeset(TextRole::Headline, cx)
.text_color(theme.colors.muted_foreground)
.role(Role::Heading)
.child(label)
@@ -465,7 +464,7 @@ impl SidebarEntry {
row.child(
div()
.flex_none()
.text_sm()
.typeset(TextRole::Subheadline, cx)
.text_color(if selected {
theme.colors.primary_foreground
} else {