From 56bb68ccd0d63d0d38d48c0b5827b9044d5caeb1 Mon Sep 17 00:00:00 2001 From: Wild Karl-Heinz Date: Thu, 10 Sep 2026 00:17:14 +0200 Subject: [PATCH] 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 --- src/components/AppToolbar.vue | 14 ++++++++++++-- src/components/SettingsPanel.vue | 28 +++++++++++++++++++++++++--- src/components/ToolbarIcon.vue | 26 +++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 6 deletions(-) diff --git a/src/components/AppToolbar.vue b/src/components/AppToolbar.vue index 9d485af..aa9a016 100644 --- a/src/components/AppToolbar.vue +++ b/src/components/AppToolbar.vue @@ -8,7 +8,7 @@ import CustomFunctionsModal from './CustomFunctionsModal.vue'; import NamedRangesModal from './NamedRangesModal.vue'; import MacrosModal from './MacrosModal.vue'; import TheLogo from './TheLogo.vue'; -import ToolbarIcon from './ToolbarIcon.vue'; +import ToolbarIcon, { type ToolbarIconName } from './ToolbarIcon.vue'; import { WICOM, WICOM_SOCIAL } from '../config/brand'; import { exportJson, @@ -42,6 +42,9 @@ const addr = `${WICOM.address.street}, ${WICOM.address.city}, ${WICOM.address.co const themeLabel = computed( () => ({ system: 'Auto', light: 'Hell', dark: 'Dunkel' })[themeMode.value], ); +const themeIcon = computed( + () => ({ system: 'auto', light: 'sun', dark: 'moon' })[themeMode.value] as ToolbarIconName, +); // ---- insert objects ------------------------------------------------ function insertTable() { @@ -299,7 +302,14 @@ function onReset() { - + diff --git a/src/components/SettingsPanel.vue b/src/components/SettingsPanel.vue index 80b9292..6b207d5 100644 --- a/src/components/SettingsPanel.vue +++ b/src/components/SettingsPanel.vue @@ -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() {