API reference
FluentElement
Provides shared Fluent design tokens and theme callbacks to QWidget-based components.
No matching API members.
fluent::FluentElement
Methods
static void setTheme(Theme theme)Updates the global theme and notifies active FluentElement instances.
static void setThemeDeferred(Theme theme)Schedules a visible-first batched theme refresh without blocking the current interaction.
static Theme currentTheme()Returns the currently active global theme.
static bool themeUsesDarkAppearance(Theme theme)Returns whether a theme uses dark-backed chrome and material tokens.
static void refreshTheme()Re-broadcasts the current theme to repaint after a design-token change.
static int themeGeneration()Monotonic counter bumped on every theme change, for staleness checks.
Theme effectiveTheme() constResolves the theme used by this element, honoring an inherited QWidget override.
bool effectiveThemeUsesDarkAppearance() constReturns whether this element's effective theme uses dark-backed chrome.
bool setThemeOverrides(const QJsonObject& overrides)Component-facing token accessors.
QJsonObject themeOverrides() constReturns this element's authored overrides.
void clearThemeOverrides()Restores all token fields to global theme defaults.
const Colors& themeColorsRef() constNon-copying access to the active color set (for hot paint paths).
Material::AcrylicToken themeAcrylic() constMaterial, elevation, and adaptive layout tokens.
QColor themeBackdrop(bool active) constWindow-chrome backdrop color for the given activation state.
virtual void onThemeUpdated()Called after the global theme changes.
Enumerations
enum ThemeGlobal visual theme used when resolving design tokens.
Light = 0Dark = 1HighContrast = 2
Types and aliases
struct ColorsDesign token snapshots returned to components.
Subclass interfaces
Constructors
Fields
FluentElementPrivate* d_ptrReserved for 1.x source compatibility.
Destructors
fluent::FluentElement::Colors
Design token snapshots returned to components.
Fields
QColor strokeDefault, strokeSecondary, strokeStrongStroke Colors
QColor strokeFocusOuter, strokeFocusInnerTwo-layer focus ring strokes.
QColor textOnAccentText on accent backgrounds (white/black).
QColor textAccentPrimaryAccent text on plain backgrounds (dark/light blue).
QColor bgCanvas, bgLayer, bgLayerAlt, bgSolidBackgrounds & Neutrals
QColor systemCritical, systemCriticalBgSystem / Semantic Colors
QList<QColor> chartsCharts
QColor bgLayerOverlaylayered content mask for translucent windows.
fluent::FluentElement::FontStyle
Methods
Fields
QString styleNameExact static face, e.g. "Regular" or "Semibold".
int lineHeightAbsolute line height in px, measured from Figma.
fluent::FluentElement::Radius
Fields
int none0: square corners.
int control4: in-page controls.
int overlay8: overlay containers (Dialog, ToolTip, Flyout).
fluent::FluentElement::Spacing
Fields
controlHeightStandard control heights.
fluent::FluentElement::Animation
Fields
int fast, normal, slow, verySlowDurations (ms)