mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
fix(panel): make font-scale visibly resize all tables/charts and raise readable base sizes
- Raise base typography tokens (data tables to 12.5px, body/titles to 13px) above CJK 12px floor and widen lg (1.14x) / xl (1.28x) scale steps - Replace 19 hardcoded px font-size rules across tables, charts, tooltips, heatmaps, and monthly bars with scalable --fs-* tokens - Bind [data-font-scale] directly in CSS and mirror onto Shadow DOM overlay panels without colliding with :host defaults - Convert rigid control/row pixel heights to scalable min-heights and scale floating panel base widths on lg/xl
This commit is contained in:
@@ -15,7 +15,11 @@ import {
|
||||
readInjectedWindowBridge,
|
||||
} from '../../../shared/window-bridge-protocol.mjs';
|
||||
import { App } from '../../App.js';
|
||||
import { applyAppearanceToRoot } from '../../core/appearance.js';
|
||||
import {
|
||||
PANEL_SCALE_FACTORS,
|
||||
applyAppearanceToRoot,
|
||||
normalizeClientFontScale,
|
||||
} from '../../core/appearance.js';
|
||||
import {
|
||||
h,
|
||||
isEventInside,
|
||||
@@ -1380,8 +1384,6 @@ export function mountWindowOverlay() {
|
||||
portalShadow.appendChild(portalStyleEl);
|
||||
|
||||
const initialSettings = telemetryStore.getState().telemetry?.settings;
|
||||
applyAppearanceToRoot(capsuleHost, initialSettings, { includeFontScale: false });
|
||||
applyAppearanceToRoot(portalHost, initialSettings, { includeFontScale: true });
|
||||
|
||||
// 悬停全景概览浮层(完全解耦至 widgetRegistry,由 hoverModules 动态驱动 0..4 个独立组件,零硬编码)
|
||||
const hoverUpdateVerText = h('span', { text: t('capsule.hoverNewVerGeneric') });
|
||||
@@ -1590,9 +1592,19 @@ export function mountWindowOverlay() {
|
||||
[appInstance.el]
|
||||
);
|
||||
|
||||
function syncPortalAppearance(settings) {
|
||||
applyAppearanceToRoot(capsuleHost, settings, { includeFontScale: false });
|
||||
applyAppearanceToRoot(portalHost, settings, { includeFontScale: true });
|
||||
const scaleKey = normalizeClientFontScale(settings?.fontScale);
|
||||
popoverEl.setAttribute?.('data-font-scale', scaleKey);
|
||||
hoverTipEl.setAttribute?.('data-font-scale', scaleKey);
|
||||
multiPanelEl.setAttribute?.('data-font-scale', scaleKey);
|
||||
}
|
||||
|
||||
portalShadow.appendChild(multiPanelEl);
|
||||
portalShadow.appendChild(hoverTipEl);
|
||||
portalShadow.appendChild(popoverEl);
|
||||
syncPortalAppearance(initialSettings);
|
||||
(document.body || document.documentElement).appendChild(portalHost);
|
||||
|
||||
// --- 3. 几何测量、IDE 主题桥接、顶栏停靠与防溢出定位 ---
|
||||
@@ -1931,8 +1943,17 @@ export function mountWindowOverlay() {
|
||||
const vh = Number(window.innerHeight || 800);
|
||||
const navRight = getLeftSidebarRightEdge(vw);
|
||||
const minLeft = navRight > 0 ? Math.max(12, navRight + 12) : 12;
|
||||
const defaultCardW = Math.min(FLOATING_CARD_WIDTH, Math.max(280, vw - 24));
|
||||
const defaultMultiW = Math.min(MULTI_PANEL_WIDTH, Math.max(280, vw - 24));
|
||||
const curSettings = telemetryStore.getState().telemetry?.settings;
|
||||
const panelScale =
|
||||
PANEL_SCALE_FACTORS[normalizeClientFontScale(curSettings?.fontScale)] ?? 1;
|
||||
const defaultCardW = Math.min(
|
||||
Math.round(FLOATING_CARD_WIDTH * panelScale),
|
||||
Math.max(280, vw - 24)
|
||||
);
|
||||
const defaultMultiW = Math.min(
|
||||
Math.round(MULTI_PANEL_WIDTH * panelScale),
|
||||
Math.max(280, vw - 24)
|
||||
);
|
||||
const isDockComposer = capsuleHost.getAttribute('data-dock') === 'composer';
|
||||
|
||||
if (multiOpen) {
|
||||
@@ -1980,9 +2001,8 @@ export function mountWindowOverlay() {
|
||||
|
||||
if (popoverOpen) {
|
||||
const maxPopCardW = Math.max(280, vw - minLeft - 12);
|
||||
const curSettings = telemetryStore.getState().telemetry?.settings;
|
||||
const popWidthMode = normalizeClientPopoverWidthMode(curSettings?.popoverWidthMode);
|
||||
let desiredPopW = Math.min(POPOVER_BASE_WIDTH, maxPopCardW);
|
||||
let desiredPopW = Math.min(Math.round(POPOVER_BASE_WIDTH * panelScale), maxPopCardW);
|
||||
if (popWidthMode === 'custom') {
|
||||
desiredPopW = Math.min(
|
||||
normalizeClientPopoverWidth(curSettings?.popoverWidth),
|
||||
@@ -2630,8 +2650,7 @@ export function mountWindowOverlay() {
|
||||
const telemetry = telSt.telemetry;
|
||||
|
||||
setI18nLanguage(telemetry?.settings?.language);
|
||||
applyAppearanceToRoot(capsuleHost, telemetry?.settings, { includeFontScale: false });
|
||||
applyAppearanceToRoot(portalHost, telemetry?.settings, { includeFontScale: true });
|
||||
syncPortalAppearance(telemetry?.settings);
|
||||
|
||||
const showMulti = telemetry?.settings?.showTopbarMultiSession !== false;
|
||||
patchAttr(multiBtn, 'hidden', !showMulti);
|
||||
|
||||
@@ -17,8 +17,15 @@ export const THEME_ACCENT_PRESETS = Object.freeze([
|
||||
export const FONT_SCALE_FACTORS = Object.freeze({
|
||||
sm: 0.92,
|
||||
md: 1,
|
||||
lg: 1.08,
|
||||
xl: 1.15,
|
||||
lg: 1.14,
|
||||
xl: 1.28,
|
||||
});
|
||||
|
||||
export const PANEL_SCALE_FACTORS = Object.freeze({
|
||||
sm: 1,
|
||||
md: 1,
|
||||
lg: 1.09,
|
||||
xl: 1.18,
|
||||
});
|
||||
|
||||
export function normalizeClientThemeAccent(raw) {
|
||||
@@ -70,10 +77,13 @@ export function applyAppearanceToRoot(targetEl, settings, { includeFontScale = t
|
||||
if (includeFontScale) {
|
||||
const scaleKey = normalizeClientFontScale(settings?.fontScale);
|
||||
const factor = FONT_SCALE_FACTORS[scaleKey] ?? 1;
|
||||
const panelFactor = PANEL_SCALE_FACTORS[scaleKey] ?? 1;
|
||||
setOrClearStyleVar(targetEl, '--ui-font-scale', factor === 1 ? '' : String(factor));
|
||||
setOrClearStyleVar(targetEl, '--ui-panel-scale', panelFactor === 1 ? '' : String(panelFactor));
|
||||
targetEl.setAttribute?.('data-font-scale', scaleKey);
|
||||
} else {
|
||||
setOrClearStyleVar(targetEl, '--ui-font-scale', '');
|
||||
setOrClearStyleVar(targetEl, '--ui-panel-scale', '');
|
||||
if (typeof targetEl.removeAttribute === 'function') {
|
||||
targetEl.removeAttribute('data-font-scale');
|
||||
}
|
||||
|
||||
@@ -16,14 +16,17 @@ async function bootstrapApp(mountTarget = document.getElementById('app-root')) {
|
||||
const appInstance = App();
|
||||
mountTarget.appendChild(appInstance.el);
|
||||
|
||||
const syncDocAppearance = (settings) => {
|
||||
setI18nLanguage(settings?.language);
|
||||
if (typeof document !== 'undefined' && document.documentElement) {
|
||||
applyAppearanceToRoot(document.documentElement, settings, { includeFontScale: true });
|
||||
}
|
||||
};
|
||||
syncDocAppearance(telemetryStore.getState().telemetry?.settings);
|
||||
|
||||
const unsubAppearance = telemetryStore.subscribe(
|
||||
(st) => st.telemetry?.settings,
|
||||
(settings) => {
|
||||
setI18nLanguage(settings?.language);
|
||||
if (typeof document !== 'undefined' && document.documentElement) {
|
||||
applyAppearanceToRoot(document.documentElement, settings, { includeFontScale: true });
|
||||
}
|
||||
}
|
||||
syncDocAppearance
|
||||
);
|
||||
|
||||
const stopPolling = startAsyncTelemetryLoop(2000);
|
||||
|
||||
@@ -224,7 +224,7 @@ export const STEP_COLUMN_REGISTRY = Object.freeze({
|
||||
if (reason && !refs.speedReason) {
|
||||
refs.speedReason = h('div', {
|
||||
className: 'text-muted',
|
||||
style: 'font-size: var(--fs-2xs);',
|
||||
style: 'font-size: var(--fs-xs);',
|
||||
});
|
||||
refs.wrapEl.appendChild(refs.speedReason);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,12 @@ body {
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
input,
|
||||
select,
|
||||
textarea,
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-stretch: inherit;
|
||||
|
||||
@@ -149,14 +149,14 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
height: 26px;
|
||||
padding: 0 var(--space-2);
|
||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
||||
padding: 2px var(--space-2);
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
line-height: 1.15;
|
||||
border-radius: var(--radius-pill);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
@@ -175,8 +175,8 @@
|
||||
.pill-tab-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 14px;
|
||||
line-height: 1;
|
||||
min-height: 14px;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.pill-tab-badge {
|
||||
@@ -223,8 +223,8 @@
|
||||
justify-content: space-between;
|
||||
gap: var(--space-2);
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(24px * var(--ui-font-scale, 1));
|
||||
padding: 2px 6px;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
border: none;
|
||||
@@ -350,7 +350,7 @@
|
||||
.number-input {
|
||||
display: inline-flex;
|
||||
align-items: stretch;
|
||||
height: 28px;
|
||||
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||
background: var(--surface-panel);
|
||||
border: 1px solid var(--border-hairline);
|
||||
border-radius: var(--radius-xs);
|
||||
@@ -410,8 +410,8 @@
|
||||
justify-content: space-between;
|
||||
gap: var(--space-2);
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
padding: 0 var(--space-2);
|
||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
||||
padding: 2px var(--space-2);
|
||||
background: var(--surface-panel);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-hairline);
|
||||
@@ -464,7 +464,7 @@
|
||||
}
|
||||
|
||||
.dt-day {
|
||||
height: 22px;
|
||||
min-height: calc(22px * var(--ui-font-scale, 1));
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
@@ -540,8 +540,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
height: 22px;
|
||||
padding: 0 7px;
|
||||
min-height: calc(22px * var(--ui-font-scale, 1));
|
||||
padding: 2px 7px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
@@ -650,8 +650,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
padding: 0 var(--space-5);
|
||||
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||
padding: 3px var(--space-5);
|
||||
background: var(--accent-primary);
|
||||
color: var(--text-inverse);
|
||||
border: 1px solid var(--accent-primary);
|
||||
@@ -675,8 +675,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
padding: 0 var(--space-4);
|
||||
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||
padding: 3px var(--space-4);
|
||||
background: var(--surface-panel);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid var(--border-strong);
|
||||
@@ -714,8 +714,8 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
height: 22px;
|
||||
padding: 0 7px;
|
||||
min-height: calc(22px * var(--ui-font-scale, 1));
|
||||
padding: 2px 7px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 600;
|
||||
border-radius: var(--radius-xs);
|
||||
@@ -748,8 +748,8 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 20px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
padding: 1px 6px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
@@ -779,8 +779,9 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
min-width: calc(16px * var(--ui-font-scale, 1));
|
||||
min-height: calc(16px * var(--ui-font-scale, 1));
|
||||
padding: 0 3px;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/* --- 1. 顶栏胶囊宿主容器 (Titlebar Capsule Host) --- */
|
||||
:host(.wm-capsule-host) {
|
||||
--ui-font-scale: 1;
|
||||
--ui-font-scale: 1 !important;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
@@ -581,7 +581,7 @@
|
||||
position: fixed;
|
||||
top: 42px;
|
||||
left: 12px;
|
||||
width: min(522px, calc(100vw - 24px));
|
||||
width: min(calc(522px * var(--ui-panel-scale, 1)), calc(100vw - 24px));
|
||||
max-height: calc(100vh - 54px);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
display: flex;
|
||||
@@ -605,7 +605,7 @@
|
||||
position: fixed;
|
||||
top: 42px;
|
||||
left: 12px;
|
||||
width: min(464px, calc(100vw - 24px));
|
||||
width: min(calc(464px * var(--ui-panel-scale, 1)), calc(100vw - 24px));
|
||||
max-height: calc(100vh - 54px);
|
||||
padding: 14px 16px;
|
||||
display: flex;
|
||||
@@ -711,8 +711,8 @@
|
||||
.wm-pin-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 16px;
|
||||
padding: 0 5px;
|
||||
min-height: calc(16px * var(--ui-font-scale, 1));
|
||||
padding: 1px 5px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
color: var(--accent-primary);
|
||||
@@ -724,8 +724,8 @@
|
||||
.wm-session-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
min-height: calc(16px * var(--ui-font-scale, 1));
|
||||
padding: 1px 4px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
|
||||
@@ -43,16 +43,15 @@
|
||||
--border-strong: color-mix(in srgb, var(--border-hairline) 72%, var(--text-primary) 28%);
|
||||
|
||||
/* Typography Hierarchy & Scalable Font Tokens */
|
||||
--ui-font-scale: 1;
|
||||
--fs-2xs: calc(9.5px * var(--ui-font-scale, 1));
|
||||
--fs-xs: calc(10px * var(--ui-font-scale, 1));
|
||||
--fs-sm: calc(10.5px * var(--ui-font-scale, 1));
|
||||
--fs-md: calc(11px * var(--ui-font-scale, 1));
|
||||
--fs-base-sm: calc(11.5px * var(--ui-font-scale, 1));
|
||||
--fs-base: calc(12px * var(--ui-font-scale, 1));
|
||||
--fs-body: calc(12.5px * var(--ui-font-scale, 1));
|
||||
--fs-lg: calc(14.5px * var(--ui-font-scale, 1));
|
||||
--fs-hero: calc(17px * var(--ui-font-scale, 1));
|
||||
--fs-2xs: calc(10.5px * var(--ui-font-scale, 1));
|
||||
--fs-xs: calc(11px * var(--ui-font-scale, 1));
|
||||
--fs-sm: calc(11.5px * var(--ui-font-scale, 1));
|
||||
--fs-md: calc(12px * var(--ui-font-scale, 1));
|
||||
--fs-base-sm: calc(12.5px * var(--ui-font-scale, 1));
|
||||
--fs-base: calc(13px * var(--ui-font-scale, 1));
|
||||
--fs-body: calc(13px * var(--ui-font-scale, 1));
|
||||
--fs-lg: calc(15px * var(--ui-font-scale, 1));
|
||||
--fs-hero: calc(18px * var(--ui-font-scale, 1));
|
||||
|
||||
--text-primary: var(--foreground, var(--vscode-foreground, var(--vscode-editor-foreground, hsl(215 22% 15%))));
|
||||
--text-secondary: var(--muted-foreground, var(--vscode-descriptionForeground, hsl(215 12% 44%)));
|
||||
@@ -120,6 +119,46 @@
|
||||
--space-5: 12px;
|
||||
}
|
||||
|
||||
:root[data-font-scale="sm"],
|
||||
:host([data-font-scale="sm"]),
|
||||
[data-font-scale="sm"] {
|
||||
--ui-font-scale: 0.92;
|
||||
--ui-panel-scale: 1;
|
||||
}
|
||||
|
||||
:root[data-font-scale="md"],
|
||||
:host([data-font-scale="md"]),
|
||||
[data-font-scale="md"] {
|
||||
--ui-font-scale: 1;
|
||||
--ui-panel-scale: 1;
|
||||
}
|
||||
|
||||
:root[data-font-scale="lg"],
|
||||
:host([data-font-scale="lg"]),
|
||||
[data-font-scale="lg"] {
|
||||
--ui-font-scale: 1.14;
|
||||
--ui-panel-scale: 1.09;
|
||||
}
|
||||
|
||||
:root[data-font-scale="xl"],
|
||||
:host([data-font-scale="xl"]),
|
||||
[data-font-scale="xl"] {
|
||||
--ui-font-scale: 1.28;
|
||||
--ui-panel-scale: 1.18;
|
||||
}
|
||||
|
||||
[data-font-scale] {
|
||||
--fs-2xs: calc(10.5px * var(--ui-font-scale, 1));
|
||||
--fs-xs: calc(11px * var(--ui-font-scale, 1));
|
||||
--fs-sm: calc(11.5px * var(--ui-font-scale, 1));
|
||||
--fs-md: calc(12px * var(--ui-font-scale, 1));
|
||||
--fs-base-sm: calc(12.5px * var(--ui-font-scale, 1));
|
||||
--fs-base: calc(13px * var(--ui-font-scale, 1));
|
||||
--fs-body: calc(13px * var(--ui-font-scale, 1));
|
||||
--fs-lg: calc(15px * var(--ui-font-scale, 1));
|
||||
--fs-hero: calc(18px * var(--ui-font-scale, 1));
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html[data-standalone="true"] {
|
||||
color-scheme: dark;
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
.cons-row-title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.3;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
@@ -177,16 +177,16 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 20px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
}
|
||||
|
||||
.cons-share-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
padding: 0 6px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.2;
|
||||
padding: 1px 6px;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 600;
|
||||
color: var(--metric-ok);
|
||||
@@ -199,8 +199,8 @@
|
||||
.cons-row-tok {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.25;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
@@ -209,8 +209,8 @@
|
||||
.cons-row-cost {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
line-height: 1;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
line-height: 1.25;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
@@ -287,7 +287,7 @@
|
||||
top: 2px;
|
||||
left: var(--peak-x, 50%);
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
font-weight: 600;
|
||||
padding: 1px 6px;
|
||||
color: var(--text-primary);
|
||||
@@ -306,7 +306,7 @@
|
||||
transform: translateX(var(--tip-shift, -50%));
|
||||
width: max-content;
|
||||
min-width: 152px;
|
||||
max-width: min(300px, calc(100% - 8px));
|
||||
max-width: min(320px, calc(100% - 8px));
|
||||
padding: 5px 9px;
|
||||
background: var(--surface-panel);
|
||||
border: 1px solid var(--border-strong);
|
||||
@@ -324,7 +324,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
font-size: 10.5px;
|
||||
font-size: var(--fs-sm);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-calls {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
max-width: 190px;
|
||||
@@ -352,7 +352,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-tokens {
|
||||
font-size: 12px;
|
||||
font-size: var(--fs-base);
|
||||
font-weight: 700;
|
||||
color: var(--accent-primary);
|
||||
white-space: nowrap;
|
||||
@@ -360,7 +360,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-cost {
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
white-space: nowrap;
|
||||
@@ -368,7 +368,7 @@
|
||||
}
|
||||
|
||||
.trend-tip-sub {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -391,7 +391,7 @@
|
||||
.trend-x-axis {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 18px;
|
||||
min-height: calc(18px * var(--ui-font-scale, 1));
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -400,10 +400,10 @@
|
||||
top: 0;
|
||||
left: var(--tick-x, 0%);
|
||||
transform: translateX(-50%);
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
line-height: 16px;
|
||||
line-height: 1.35;
|
||||
cursor: pointer;
|
||||
transition: color var(--dur-instant) var(--ease-fast);
|
||||
}
|
||||
@@ -455,21 +455,21 @@
|
||||
|
||||
.trend-hm-weekdays {
|
||||
display: grid;
|
||||
grid-template-rows: 15px repeat(7, var(--hm-cell));
|
||||
grid-template-rows: calc(15px * var(--ui-font-scale, 1)) repeat(7, var(--hm-cell));
|
||||
row-gap: var(--hm-gap);
|
||||
width: 14px;
|
||||
width: calc(15px * var(--ui-font-scale, 1));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.trend-hm-month-spacer {
|
||||
height: 15px;
|
||||
height: calc(15px * var(--ui-font-scale, 1));
|
||||
}
|
||||
|
||||
.trend-hm-wday {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 9px;
|
||||
font-size: var(--fs-2xs);
|
||||
line-height: 1;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
@@ -490,7 +490,7 @@
|
||||
|
||||
.trend-hm-months {
|
||||
position: relative;
|
||||
height: 15px;
|
||||
height: calc(15px * var(--ui-font-scale, 1));
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -498,8 +498,8 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: calc(var(--hm-col, 0) * (var(--hm-cell) + var(--hm-gap)));
|
||||
font-size: 9.5px;
|
||||
line-height: 14px;
|
||||
font-size: var(--fs-2xs);
|
||||
line-height: 1.25;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
pointer-events: none;
|
||||
@@ -564,7 +564,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
min-height: 16px;
|
||||
}
|
||||
@@ -581,7 +581,7 @@
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
flex-shrink: 0;
|
||||
font-size: 9.5px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
}
|
||||
|
||||
.month-cost {
|
||||
font-size: 9.5px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-secondary);
|
||||
min-height: 14px;
|
||||
white-space: nowrap;
|
||||
@@ -686,7 +686,7 @@
|
||||
}
|
||||
|
||||
.month-label {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-secondary);
|
||||
padding: 1px 3px;
|
||||
border-radius: var(--radius-xs);
|
||||
@@ -700,7 +700,7 @@
|
||||
}
|
||||
|
||||
.month-tok {
|
||||
font-size: 9px;
|
||||
font-size: var(--fs-2xs);
|
||||
color: var(--text-muted);
|
||||
min-height: 12px;
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -156,8 +156,8 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
height: 18px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(18px * var(--ui-font-scale, 1));
|
||||
padding: 1px 6px;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
@@ -547,8 +547,8 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
height: 20px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(20px * var(--ui-font-scale, 1));
|
||||
padding: 1px 6px;
|
||||
border: 1px solid var(--border-hairline);
|
||||
background: var(--surface-panel);
|
||||
color: var(--text-secondary);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
.settings-subnav-bar .seg-btn {
|
||||
height: 24px;
|
||||
min-height: calc(24px * var(--ui-font-scale, 1));
|
||||
font-size: var(--fs-base-sm);
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -55,9 +55,9 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
height: 25px;
|
||||
min-height: calc(25px * var(--ui-font-scale, 1));
|
||||
min-width: 0;
|
||||
padding: 0 6px;
|
||||
padding: 2px 6px;
|
||||
border: 1px solid var(--border-hairline);
|
||||
border-radius: var(--radius-xs);
|
||||
background: var(--surface-subtle);
|
||||
@@ -116,8 +116,8 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
height: 24px;
|
||||
padding: 0 9px;
|
||||
min-height: calc(24px * var(--ui-font-scale, 1));
|
||||
padding: 2px 9px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
@@ -240,7 +240,7 @@
|
||||
}
|
||||
|
||||
.structure-preview-canvas.is-scaled {
|
||||
zoom: 0.86;
|
||||
zoom: 0.9;
|
||||
}
|
||||
|
||||
.wm-hover-tip.is-preview {
|
||||
@@ -286,6 +286,7 @@
|
||||
}
|
||||
|
||||
.preview-capsule-bar {
|
||||
--ui-font-scale: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -431,8 +432,8 @@
|
||||
.collapsible-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 18px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(18px * var(--ui-font-scale, 1));
|
||||
padding: 1px 6px;
|
||||
font-size: var(--fs-sm);
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
@@ -577,8 +578,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
height: 24px;
|
||||
padding: 0 9px;
|
||||
min-height: calc(24px * var(--ui-font-scale, 1));
|
||||
padding: 2px 9px;
|
||||
font-size: var(--fs-md);
|
||||
font-weight: 500;
|
||||
color: var(--accent-primary);
|
||||
@@ -711,8 +712,8 @@
|
||||
.settings-text-input {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
height: 28px;
|
||||
padding: 0 8px;
|
||||
min-height: calc(28px * var(--ui-font-scale, 1));
|
||||
padding: 2px 8px;
|
||||
background: var(--surface-subtle);
|
||||
border: 1px solid var(--border-hairline);
|
||||
border-radius: var(--radius-xs);
|
||||
@@ -738,7 +739,7 @@
|
||||
}
|
||||
|
||||
.settings-number-wrap .number-input {
|
||||
height: 24px;
|
||||
min-height: calc(24px * var(--ui-font-scale, 1));
|
||||
background: var(--surface-subtle);
|
||||
}
|
||||
|
||||
@@ -831,7 +832,7 @@
|
||||
|
||||
.ctx-risk-accept-btn {
|
||||
margin-top: 2px;
|
||||
height: 26px;
|
||||
padding: 0 var(--space-3);
|
||||
min-height: calc(26px * var(--ui-font-scale, 1));
|
||||
padding: 2px var(--space-3);
|
||||
font-size: var(--fs-md);
|
||||
}
|
||||
|
||||
@@ -35,13 +35,14 @@
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: var(--fs-md);
|
||||
font-size: var(--fs-base-sm);
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
padding: 5px 4px;
|
||||
padding: calc(5px * var(--ui-font-scale, 1)) calc(4px * var(--ui-font-scale, 1));
|
||||
text-align: left;
|
||||
font-size: var(--fs-base-sm);
|
||||
border-bottom: 1px solid var(--border-hairline);
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -78,7 +79,7 @@
|
||||
.step-model-cell {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
max-width: var(--step-model-max-w, 176px);
|
||||
max-width: calc(var(--step-model-max-w, 176px) * var(--ui-font-scale, 1));
|
||||
min-width: 0;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
@@ -133,8 +134,9 @@
|
||||
|
||||
.steps-inline-scope-select .select-trigger,
|
||||
.steps-inline-model-select .select-trigger {
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(22px * var(--ui-font-scale, 1));
|
||||
height: auto;
|
||||
padding: 2px 6px;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
@@ -320,8 +322,9 @@
|
||||
}
|
||||
|
||||
.sstep-fit-model-select .select-trigger {
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
min-height: calc(22px * var(--ui-font-scale, 1));
|
||||
height: auto;
|
||||
padding: 2px 6px;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
@@ -377,7 +380,7 @@
|
||||
.sstep-axis-label {
|
||||
fill: var(--text-muted);
|
||||
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
||||
font-size: 9.5px;
|
||||
font-size: var(--fs-2xs);
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -485,7 +488,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 11px;
|
||||
font-size: var(--fs-md);
|
||||
pointer-events: none;
|
||||
z-index: 2;
|
||||
}
|
||||
@@ -496,7 +499,7 @@
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 10px;
|
||||
padding-top: 2px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
@@ -535,7 +538,7 @@
|
||||
flex-wrap: wrap;
|
||||
gap: 4px 8px;
|
||||
padding-top: 2px;
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
@@ -595,7 +598,7 @@
|
||||
}
|
||||
|
||||
.sstep-fit-delta {
|
||||
font-size: 10px;
|
||||
font-size: var(--fs-xs);
|
||||
}
|
||||
|
||||
/* --- 4. 极简高密度模型总览列表 (Minimalist Session Model Summary Cards) --- */
|
||||
|
||||
Reference in New Issue
Block a user