[ui]: set settings window to apply mica materia

This commit is contained in:
fanlumaster committed 2025-11-05 12:38:53 +08:00
1 parent 2c5df9958c
commit bbe2baffa0
2 files changed
+8 -2

No files matched your search

+3 -2
View File
@@ -6,7 +6,7 @@
--item-active-hover: rgba(255, 255, 255, 0.06);
--text-color: #f3f3f3;
--border-color: rgba(255, 255, 255, 0.08);
--card-bg: rgba(38, 38, 38, 0.8);
--card-bg: rgba(38, 38, 38, 0.5);
--titlebar-height: 32px;
}
@@ -24,7 +24,8 @@ body {
width: 100vw;
color: var(--text-color);
/* background: var(--bg-color); */
background: #202020;
/* background: #202020; */
background: transparent;
/* backdrop-filter: blur(20px) saturate(160%); */
-webkit-backdrop-filter: blur(20px) saturate(160%);
/* overflow: hidden; */
+5
View File
@@ -194,6 +194,11 @@ int CreateCandidateWindow(HINSTANCE hInstance)
::global_hwnd_settings = hwnd_settings;
BOOL cloak = TRUE;
DwmSetWindowAttribute(hwnd_settings, DWMWA_CLOAK, &cloak, sizeof(cloak));
/* 设置标题栏和窗口区域为 mica 材质 */
MARGINS margins = {-1};
DwmExtendFrameIntoClientArea(hwnd_settings, &margins);
DWM_SYSTEMBACKDROP_TYPE backdrop = DWMSBT_MAINWINDOW; // Mica 背景类型
DwmSetWindowAttribute(hwnd_settings, DWMWA_SYSTEMBACKDROP_TYPE, &backdrop, sizeof(backdrop));
//
// floating toolbar 窗口