Move zoom control into the status bar, right end

Was a floating pill pinned to the bottom-right corner of the canvas
(SheetCanvas.vue's .zoom-ctl); now lives as the last element of the
status bar (StatusBar.vue), after a thin divider, in the same combined
bottom row as the sheet tabs. Same three actions (−, current % as a
button that resets to 100%, +), same store.activeZoom/setZoom.
Ctrl/Cmd+scroll-to-zoom on the canvas is unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
wkh
2026-09-02 22:46:25 +02:00
co-authored by Claude Sonnet 5
parent 01ea18106c
commit 3fd5a84701
2 changed files with 40 additions and 35 deletions
-35
View File
@@ -109,13 +109,6 @@ function selectObj(id: string) {
</div> </div>
</div> </div>
<div class="zoom-ctl">
<button @click="setZoom(zoom - 0.1)">−</button>
<span>{{ Math.round(zoom * 100) }}%</span>
<button @click="setZoom(zoom + 0.1)">+</button>
<button class="fit" @click="setZoom(1)">100%</button>
</div>
<div v-if="dropActive" class="drop">Datei ablegen (.json .csv .xlsx)</div> <div v-if="dropActive" class="drop">Datei ablegen (.json .csv .xlsx)</div>
</div> </div>
</template> </template>
@@ -170,34 +163,6 @@ function selectObj(id: string) {
height: 62px; height: 62px;
opacity: 0.9; opacity: 0.9;
} }
.zoom-ctl {
position: absolute;
right: 16px;
bottom: 16px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 999px;
box-shadow: var(--shadow);
font-size: 12px;
font-variant-numeric: tabular-nums;
z-index: 15;
}
.zoom-ctl button {
border: 1px solid var(--border);
background: var(--surface);
border-radius: 6px;
width: 22px;
height: 22px;
cursor: pointer;
}
.zoom-ctl button.fit {
width: auto;
padding: 0 8px;
}
.drop { .drop {
position: absolute; position: absolute;
right: 24px; right: 24px;
+40
View File
@@ -7,6 +7,9 @@ const store = useDocument();
const agg = computed(() => store.selectionAggregate.value); const agg = computed(() => store.selectionAggregate.value);
const fmt = (n: number) => const fmt = (n: number) =>
formatValue(Math.round(n * 1e6) / 1e6, store.activeLocale.value); formatValue(Math.round(n * 1e6) / 1e6, store.activeLocale.value);
const zoom = computed(() => store.activeZoom.value);
const setZoom = store.setZoom;
</script> </script>
<template> <template>
@@ -16,6 +19,12 @@ const fmt = (n: number) =>
<span v-if="agg.count > 0" class="metric">Mittel <b>{{ fmt(agg.avg) }}</b></span> <span v-if="agg.count > 0" class="metric">Mittel <b>{{ fmt(agg.avg) }}</b></span>
<span class="metric">Anzahl <b>{{ agg.count }}</b></span> <span class="metric">Anzahl <b>{{ agg.count }}</b></span>
<span class="metric dim">Zellen {{ agg.cells }}</span> <span class="metric dim">Zellen {{ agg.cells }}</span>
<span class="divider" />
<div class="zoom-ctl" title="Zoom (dieses Blatt)">
<button @click="setZoom(zoom - 0.1)">−</button>
<button class="fit" @click="setZoom(1)">{{ Math.round(zoom * 100) }}%</button>
<button @click="setZoom(zoom + 0.1)">+</button>
</div>
</div> </div>
</template> </template>
@@ -47,4 +56,35 @@ const fmt = (n: number) =>
font-weight: 600; font-weight: 600;
color: var(--text); color: var(--text);
} }
.divider {
width: 1px;
align-self: stretch;
background: var(--border);
flex: none;
}
.zoom-ctl {
display: inline-flex;
align-items: center;
gap: 4px;
flex: none;
}
.zoom-ctl button {
border: 1px solid var(--border);
background: var(--surface);
border-radius: 6px;
width: 20px;
height: 20px;
line-height: 1;
cursor: pointer;
color: var(--text-dim);
}
.zoom-ctl button:hover {
border-color: var(--accent);
color: var(--accent);
}
.zoom-ctl button.fit {
width: auto;
padding: 0 7px;
font-variant-numeric: tabular-nums;
}
</style> </style>