chore: replace pixel metrics with rem-based sizing across ui
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

This commit is contained in:
2026-11-19 15:47:50 +07:00
parent 5a597f43c4
commit a0f69b6450
74 changed files with 897 additions and 1090 deletions
+5 -5
View File
@@ -7,7 +7,7 @@ use signed_state::{Backend, BackendEvent, PushStepStatus};
use ui::common::{h_flex, v_flex};
use ui::icons::{Icon, IconRole};
use ui::spinner::Spinner;
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use ui::theme::ActiveTheme as _;
/// Progress of an async dialog action: a busy flag that disables the form and an error shown below it.
#[derive(Debug, Default)]
@@ -69,7 +69,7 @@ impl DialogProgress {
pub fn error_row(error: &Option<SharedString>, cx: &App) -> Option<AnyElement> {
error.as_ref().map(|message| {
div()
.typeset(TextRole::Body, cx)
.text_base()
.text_color(cx.theme().ramps.destructive.base)
.child(message.clone())
.into_any_element()
@@ -90,14 +90,14 @@ pub fn push_steps_row(steps: &[PushStepStatus], cx: &App) -> Option<AnyElement>
match status {
PushStepStatus::Running(_) => h_flex()
.gap_2()
.typeset(TextRole::Body, cx)
.text_base()
.text_color(cx.theme().colors.muted_foreground)
.child(Spinner::new("push-step"))
.child(label)
.into_any_element(),
PushStepStatus::Done(_) => h_flex()
.gap_2()
.typeset(TextRole::Body, cx)
.text_base()
.text_color(cx.theme().colors.foreground)
.child(
Icon::named(IconRole::Check)
@@ -108,7 +108,7 @@ pub fn push_steps_row(steps: &[PushStepStatus], cx: &App) -> Option<AnyElement>
.into_any_element(),
PushStepStatus::Failed(_, reason) => h_flex()
.gap_2()
.typeset(TextRole::Body, cx)
.text_base()
.text_color(cx.theme().ramps.destructive.base)
.child(
Icon::named(IconRole::Close)
+4 -2
View File
@@ -1,9 +1,10 @@
use gpui::{AnyElement, App, IntoElement, ParentElement as _, SharedString, Styled as _, div};
use signed_core::RepoStatus;
use ui::badge::{Badge, BadgeVariant};
use ui::common::StyledExt as _;
use ui::empty_state::EmptyState;
use ui::icons::{Icon, IconRole};
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use ui::theme::ActiveTheme as _;
use ui::tooltip::Tooltip;
/// The status pill shown on issue and pull-request rows.
@@ -35,7 +36,8 @@ pub fn empty_state(message: impl Into<SharedString>) -> AnyElement {
/// A one-line muted label used by section headers.
pub fn section_label(text: impl Into<SharedString>, cx: &App) -> AnyElement {
div()
.typeset(TextRole::Caption2, cx)
.text_xs()
.font_medium()
.text_color(cx.theme().colors.muted_foreground)
.child(text.into())
.into_any_element()