theme: add typography scale per platforms
This commit is contained in:
@@ -13,12 +13,14 @@ mod ramps;
|
||||
mod resolve;
|
||||
mod source;
|
||||
mod system;
|
||||
mod typography;
|
||||
|
||||
pub use colors::{ColorTokens, MaterialTokens};
|
||||
pub use definition::ThemeDefinition;
|
||||
pub use ramps::{AccentShades, Oklch};
|
||||
pub use resolve::{Ramps, ResolvedTheme};
|
||||
pub use system::{AccessibilityPreferences, PartialPalette, SourceKind, SystemTheme};
|
||||
pub use typography::{TextRole, TypeMetrics, Typeset, Typography};
|
||||
|
||||
use gpui::{
|
||||
App, Global, Hsla, Pixels, SpringConfig, WindowAppearance, WindowBackgroundAppearance, hsla, px,
|
||||
@@ -163,6 +165,8 @@ pub struct Theme {
|
||||
pub root_font_size: Pixels,
|
||||
/// The platform's monospace family, for code surfaces.
|
||||
pub mono_font: &'static str,
|
||||
/// The platform's type ladder, resolved at the root font size.
|
||||
pub typography: Typography,
|
||||
pub sizes: SizeTable,
|
||||
pub accessibility: AccessibilityPreferences,
|
||||
/// The material a window should open with, after accessibility.
|
||||
@@ -192,6 +196,7 @@ impl Theme {
|
||||
titlebar_height: resolved.titlebar_height,
|
||||
root_font_size: resolved.root_font_size,
|
||||
mono_font: resolved.mono_font,
|
||||
typography: resolved.typography,
|
||||
sizes: resolved.sizes,
|
||||
accessibility: resolved.accessibility,
|
||||
window_background: resolved.window_background,
|
||||
|
||||
Reference in New Issue
Block a user