introduce typography system and motion module

This commit is contained in:
2026-10-09 19:54:08 +07:00
parent 41e991dd30
commit df411bd044
53 changed files with 1116 additions and 457 deletions
+10 -10
View File
@@ -15,7 +15,7 @@ use person::PersonRegistry;
use settings::AppSettings;
use smallvec::{SmallVec, smallvec};
use state::{Announcement, CLIENT_NAME, NostrRegistry, UniversalSigner};
use theme::{ActiveTheme, control_radius};
use theme::{ActiveTheme, TextStyle, Typeset as _, control_radius};
use ui::avatar::Avatar;
use ui::button::Button;
use ui::notification::{Notification, NotificationKind};
@@ -720,25 +720,25 @@ impl DeviceRegistry {
.title("Encryption Key Request")
.content(move |_this, _window, cx| {
v_flex()
.gap_2()
.text_sm()
.gap(px(theme::SPACE))
.text_style(TextStyle::Callout)
.child(
div()
.text_sm()
.text_style(TextStyle::Callout)
.line_height(relative(1.25))
.child(SharedString::from(MSG)),
)
.child(
v_flex()
.gap_2()
.gap(px(theme::SPACE))
.child(
v_flex()
.gap_1()
.text_sm()
.text_style(TextStyle::Callout)
.child(
div()
.font_semibold()
.text_xs()
.text_style(TextStyle::Caption)
.text_color(cx.theme().text_muted)
.child(SharedString::from("From:")),
)
@@ -751,7 +751,7 @@ impl DeviceRegistry {
.bg(cx.theme().surface_card)
.child(
h_flex()
.gap_2()
.gap(px(theme::SPACE))
.child(
Avatar::new(profile.avatar())
.seed(profile.avatar_seed())
@@ -764,11 +764,11 @@ impl DeviceRegistry {
.child(
v_flex()
.gap_1()
.text_sm()
.text_style(TextStyle::Callout)
.child(
div()
.font_semibold()
.text_xs()
.text_style(TextStyle::Caption)
.text_color(cx.theme().text_muted)
.child(SharedString::from("Code:")),
)