Fluent-Qt

API reference

ThemeRegistry

Runtime store for the theme-able design tokens consumed by every FluentElement.

fluent::ThemeRegistry

Methods

Snapshot snapshot() const

Returns the compatible Light/Dark and shared portion of the current state.

ExtendedSnapshot extendedSnapshot() const

Returns the complete three-palette theme state.

static Snapshot defaultSnapshot()

Returns the built-in Light/Dark and shared state without changing the registry.

static ExtendedSnapshot defaultExtendedSnapshot()

Returns the built-in three-palette theme state.

bool applySnapshot(const Snapshot& snapshot)

Atomically commits the compatible snapshot while preserving High Contrast.

bool applyExtendedSnapshot(const ExtendedSnapshot& snapshot)

Atomically commits all three palettes and shared theme tokens.

const FluentElement::Colors& colors(bool dark) const

Deprecated · Use colors(FluentElement::Theme)

Returns a legacy Light/Dark palette selected by a boolean.

FluentElement::FontStyle resolvedFontStyle(Typography::FontRole role) const

Resolves a typography role with the active family override and scale.

void setColors(bool dark, const FluentElement::Colors& colors)

Deprecated · Use setColors(FluentElement::Theme, const Colors&)

Updates a legacy Light/Dark palette selected by a boolean.

void setColors(FluentElement::Theme theme, const FluentElement::Colors& colors)

Convenience token updates. Each changed value uses the matching snapshot transaction.

void resetToDefaults()

Restore the built-in Fluent defaults.

int revision() const

Monotonic counter bumped once per changed snapshot.

Types and aliases

struct Snapshot

Legacy Light/Dark palettes and shared runtime theme state.

struct ExtendedSnapshot

Extended theme state including the High Contrast palette.

fluent::ThemeRegistry::Snapshot

Legacy Light/Dark palettes and shared runtime theme state.

Fields

fluent::ThemeRegistry::ExtendedSnapshot

Extended theme state including the High Contrast palette.

Fields