API 參考
OverlayScrim
用於模態覆蓋層、抽屜與聚光燈背後的同視窗壓暗遮罩。
沒有符合的 API 成員。
fluent::overlay::OverlayScrim
繼承自 QWidget · FluentElement
建構函式
方法
double progress() constDialog 淡入淡出與聚光燈動畫使用的別名。
void setProgress(double progress)模糊與壓暗共用的淡入進度,從 0(透明)到 1(完全顯示)。
void setColor(const QColor& color)覆寫佈景主題煙霧遮罩色;無效色彩會還原佈景主題 token。
QRect spotlightRect() const保持不壓暗的圓角挖空區域(遮罩區域座標)。
void setSpotlightRect(const QRect& rect)保持不壓暗的圓角挖空區域(遮罩區域座標)。
屬性
double progress模糊與壓暗共用的淡入進度,從 0(透明)到 1(完全顯示)。
讀取progress()設定setProgress()QRect spotlightRect保持不壓暗的圓角挖空區域(遮罩區域座標)。
讀取spotlightRect()設定setSpotlightRect()
訊號
受保護成員
方法
繼承自 fluent::FluentElement
列舉
enum Theme解析設計 token 時使用的全域視覺佈景主題。
Light = 0Dark = 1HighContrast = 2
方法
static void setTheme(Theme theme)更新全域主題,並通知使用中的 FluentElement 執行個體。
static void setThemeDeferred(Theme theme)排程以可見元素優先的批次主題重新整理,避免阻斷目前的互動。
static Theme currentTheme()傳回目前生效的全域主題。
static bool themeUsesDarkAppearance(Theme theme)傳回主題是否使用深色底的視窗框架與材質 token。
static void refreshTheme()在設計 token 變更後重新廣播目前佈景主題以觸發重繪。
static int themeGeneration()每次主題變更時遞增的單調計數器,用於過期檢查。
Theme effectiveTheme() const解析此元素所使用的佈景主題,並遵循繼承的 QWidget 覆寫。
bool effectiveThemeUsesDarkAppearance() const傳回此元素的實際主題是否使用深色底 chrome。
bool setThemeOverrides(const QJsonObject& overrides)取代此元素的稀疏色彩、圓角與字型 token 覆寫。
QJsonObject themeOverrides() const傳回此元素的覆寫設定。
void clearThemeOverrides()將全部 token 欄位還原為全域主題預設值。
const Colors& themeColorsRef() const對目前使用中色組的不複製存取(適用於繪製熱路徑)。
Material::AcrylicToken themeAcrylic() const材質、高度層級與自適應版面配置 token。
QColor themeBackdrop(bool active) const指定啟用狀態下的視窗 chrome 背景色。
virtual void onThemeUpdated()在全域主題變更後呼叫。
型別與別名
struct Colors傳回給元件使用的設計 token 快照。
Qt 基底類別文件:QWidget