Expand description
A separately selectable macOS 26 theme for FerroUI.
The compiled-XAML control foundation is copied from ferroui-themes-winui;
the macOS package owns its resources, control templates, namespace and loader.
It has no dependency on the WinUI theme crate. The original input, binding,
template-part and accessibility contracts remain in FerroUI controls.
use ferroui_themes_macos::{ControlSize, MacOSTheme};
let theme = MacOSTheme::new();
theme.set_control_size(ControlSize::Regular);
application.styles().add(theme.as_style());ReduceMotion, ReduceTransparency, IncreaseContrast, WindowActive,
AccentColor and ControlSize are live properties usable in Rust and XAML.
Glass surfaces use the existing composition material contract, with an opaque
fallback on unsupported backends. Exact AppKit optical and animation fidelity
requires the native comparison procedure in docs/porting/macos26-theme.md.
SF Pro is resolved from the host; Apple fonts and symbols are not bundled.
Modules§
- accents
- converters
- The value converters of the WinUI theme: the converters of microsoft-ui-xaml that the theme
resources name and FerroUI’s control set has no counterpart of (docs/porting/winui-theme.md,
section 5). Markup names them with
xmlns:winuiconverters="using:FerroUI.Themes.MacOS.Converters". - primitives
- The primitives of WinUI that the templates of the theme use and FerroUI’s control set has no
counterpart of (
Microsoft.UI.Xaml.Controls.Primitivesof microsoft-ui-xaml). Markup names them withxmlns:primitives="using:FerroUI.Themes.MacOS.Primitives".
Structs§
- Excluded
Document - A control theme document that is embedded but not part of the theme yet, because it names types that are not ported or is not finished.
- MacOS
Theme - Includes the macOS 26 theme in an application.
Enums§
- Control
Size - macOS 26 control sizes. Values are in device-independent points. Large and extra-large controls use capsule outlines; the smaller sizes retain rounded rectangular outlines. Metrics are calibrated theme values.
- Density
Style - Legacy density selection. Compact maps the standard controls to the Small size.
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Functions§
- excluded_
documents - The control theme documents
Controls/MacOSControls.xamldoes not merge yet, fromControls/excluded.txt. - register_
types - Registers the namespaces, the types, the assembly, the embedded documents and the document loader of this crate (and of the crates it is built on). Cheap and idempotent.