Show the theme selector as icons instead of text
The toolbar's theme-cycling button ("Theme: Auto") and the Settings
panel's Auto/Hell/Dunkel segmented control now use icons -- a sun, a
moon, and a half-filled circle for "follows system" -- drawn in this
project's existing hand-drawn SVG icon set (ToolbarIcon.vue) rather than
a new icon system or emoji. Tooltips/aria-labels keep the full text for
accessibility; the toolbar button's click-to-cycle behavior is
unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import { useTheme } from '../composables/useTheme';
|
||||
import { NUMBER_LOCALES, NUM_FORMATS } from '../store/format';
|
||||
import type { CellFormat, HAlign } from '../store/types';
|
||||
import { DEFAULT_GRID_SIZE, MIN_GRID_SIZE, MAX_GRID_SIZE } from '../store/types';
|
||||
import ToolbarIcon from './ToolbarIcon.vue';
|
||||
|
||||
const store = useDocument();
|
||||
const { mode: themeMode } = useTheme();
|
||||
@@ -512,9 +513,30 @@ function resetDoc() {
|
||||
<label class="f">
|
||||
<span>Erscheinungsbild</span>
|
||||
<div class="seg">
|
||||
<button :class="{ on: themeMode === 'system' }" @click="themeMode = 'system'">Auto</button>
|
||||
<button :class="{ on: themeMode === 'light' }" @click="themeMode = 'light'">Hell</button>
|
||||
<button :class="{ on: themeMode === 'dark' }" @click="themeMode = 'dark'">Dunkel</button>
|
||||
<button
|
||||
:class="{ on: themeMode === 'system' }"
|
||||
title="Auto (folgt dem System)"
|
||||
aria-label="Auto (folgt dem System)"
|
||||
@click="themeMode = 'system'"
|
||||
>
|
||||
<ToolbarIcon name="auto" />
|
||||
</button>
|
||||
<button
|
||||
:class="{ on: themeMode === 'light' }"
|
||||
title="Hell"
|
||||
aria-label="Hell"
|
||||
@click="themeMode = 'light'"
|
||||
>
|
||||
<ToolbarIcon name="sun" />
|
||||
</button>
|
||||
<button
|
||||
:class="{ on: themeMode === 'dark' }"
|
||||
title="Dunkel"
|
||||
aria-label="Dunkel"
|
||||
@click="themeMode = 'dark'"
|
||||
>
|
||||
<ToolbarIcon name="moon" />
|
||||
</button>
|
||||
</div>
|
||||
</label>
|
||||
<label class="f">
|
||||
|
||||
Reference in New Issue
Block a user