From 5d28046d4ad9e07ab06d4e5f87be1de77061fb43 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Mon, 16 Nov 2026 09:03:12 +0700 Subject: [PATCH] theme: use semibold headlines and 24pt menu rows --- crates/theme/src/resolve.rs | 2 +- crates/theme/src/source/macos.rs | 6 +++--- crates/theme/src/typography.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/theme/src/resolve.rs b/crates/theme/src/resolve.rs index b93d8ae..75585c4 100644 --- a/crates/theme/src/resolve.rs +++ b/crates/theme/src/resolve.rs @@ -1103,7 +1103,7 @@ mod tests { stated.root_font_size = Some(px(13.)); let native = resolve(&stated, None, None, None); assert_eq!(native.typography.body.size, px(13.)); - assert_eq!(native.typography.headline.weight, FontWeight::BOLD); + assert_eq!(native.typography.headline.weight, FontWeight::SEMIBOLD); // A custom root rescales the whole ladder off the platform's base. let custom = CustomTheme { diff --git a/crates/theme/src/source/macos.rs b/crates/theme/src/source/macos.rs index 937a7da..31a90fb 100644 --- a/crates/theme/src/source/macos.rs +++ b/crates/theme/src/source/macos.rs @@ -22,12 +22,12 @@ use crate::system::{AccessibilityPreferences, PartialPalette, SourceKind, System /// Default control radius for macOS controls. const CONTROL_RADIUS_PTS: f32 = 6.0; -/// The rounded-bezel text field's intrinsic height at regular size. +/// The text field's intrinsic height at regular size, square or rounded bezel alike. const INPUT_HEIGHT_PTS: f32 = 24.0; /// AppKit's regular push button, measured via `NSButton::fittingSize`. const CONTROL_HEIGHT_PTS: f32 = 24.0; -/// The standard `NSMenu` row height. -const MENU_ITEM_HEIGHT_PTS: f32 = 20.0; +/// The `NSMenu` row height; 20 before the macOS 26 redesign. +const MENU_ITEM_HEIGHT_PTS: f32 = 24.0; /// `NSSwitch`, measured via `fittingSize`. const SWITCH_TRACK_HEIGHT_PTS: f32 = 24.0; const SWITCH_TRACK_WIDTH_PTS: f32 = 54.0; diff --git a/crates/theme/src/typography.rs b/crates/theme/src/typography.rs index 6685ecc..0d9de9a 100644 --- a/crates/theme/src/typography.rs +++ b/crates/theme/src/typography.rs @@ -371,7 +371,7 @@ mod tests { TypeMetrics { size: px(13.0), line_height: px(16.0), - weight: FontWeight::BOLD + weight: FontWeight::SEMIBOLD } ); assert_eq!(