feat: resolve all 22 items in Features and Bugs.txt and complete UI polish
This commit is contained in:
@@ -166,3 +166,15 @@ export function applyFontSettings(s: Partial<FontSettings>): void {
|
||||
if (s.measure != null) root.style.setProperty("--ps-font-measure", `${s.measure}px`);
|
||||
if (s.family != null && s.family !== "") root.style.setProperty("--ps-font-body", s.family);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply UI density ("compact" | "comfortable") by setting `data-density` on
|
||||
* `:root` and updating `--ps-density` and `--ps-topbar-h`.
|
||||
*/
|
||||
export function applyDensity(density: "compact" | "comfortable"): void {
|
||||
const root = typeof document !== "undefined" ? document.documentElement : undefined;
|
||||
if (!root) return;
|
||||
root.dataset.density = density;
|
||||
root.style.setProperty("--ps-density", density === "compact" ? "8px" : "14px");
|
||||
root.style.setProperty("--ps-topbar-h", density === "compact" ? "40px" : "48px");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user