Skip to main content

Crate ferroui_themes_macos

Crate ferroui_themes_macos 

Source
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.Primitives of microsoft-ui-xaml). Markup names them with xmlns:primitives="using:FerroUI.Themes.MacOS.Primitives".

Structs§

ExcludedDocument
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.
MacOSTheme
Includes the macOS 26 theme in an application.

Enums§

ControlSize
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.
DensityStyle
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.xaml does not merge yet, from Controls/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.