chore: replace pixel metrics with rem-based sizing across ui
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user