feat(界面设计): 全界面材质适配
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-31 12:32:13 +08:00
1 parent d5533841c0
commit 89efb839ac
7 files changed
+60 -40

No files matched your search

+19 -3
View File
@@ -203,12 +203,28 @@
user-select: none;
}
:root[data-titlebar-material],
:root[data-titlebar-material] body,
:root[data-titlebar-material] .document-titlebar {
:root[data-window-material],
:root[data-window-material] body,
:root[data-window-material] .document-titlebar {
background: transparent;
}
:root[data-window-material] :is(.toolbar-frame, .editor-toolbar, .app-footer, .document-tab[data-selected="true"]) {
background: color-mix(in srgb, var(--bar-bg) 65%, transparent);
}
:root[data-window-material] .toolbar-frame > .toolbar {
background: transparent;
}
:root[data-window-material] :is(.page-list-panel, .meta-panel) {
background: color-mix(in srgb, var(--panel) 70%, transparent);
}
:root[data-window-material] .viewer-panel {
background-color: color-mix(in srgb, var(--canvas) 50%, transparent);
}
.document-titlebar::before {
content: "";
position: absolute;
+1 -1
View File
@@ -2647,7 +2647,7 @@ function isForegroundDocument(tab) {
function applyTitleBarInfo(info) {
if (!info || !info.height) return;
workspace.titleBarReady = true;
document.documentElement.toggleAttribute("data-titlebar-material", info.material === 1 || info.material === 2);
document.documentElement.toggleAttribute("data-window-material", info.material === 1 || info.material === 2);
document.body.style.setProperty("--titlebar-height", `${info.height}px`);
el.documentTitleBar.style.setProperty("--titlebar-left", `${info.left}px`);
el.documentTitleBar.style.setProperty("--titlebar-right", `${info.right}px`);
+2 -2
View File
@@ -3,7 +3,7 @@
const preference = matchMedia("(prefers-color-scheme: dark)");
const key = "ofdgo.theme";
let mode = root.dataset.themeMode || "system";
let material = root.dataset.titlebarChoice || "acrylic";
let material = root.dataset.windowChoice || "acrylic";
let host = null, report = null, pending = Promise.resolve(), revision = 0, committed = null;
if (!root.dataset.themeMode) {
try { mode = localStorage.getItem(key) || "system"; } catch {}
@@ -57,7 +57,7 @@
window.ofdgoTheme = {set, flush, connect(value, onError) {
host = value;
report = onError;
const materials = (root.dataset.titlebarMaterials || "").split(",");
const materials = (root.dataset.windowMaterials || "").split(",");
if (host && materials.length > 1) {
document.querySelector(".appearance-material").hidden = false;
for (const button of document.querySelectorAll("[data-material-choice]")) {