From e8da519d29070f20208372872c13ec5a1d1361a7 Mon Sep 17 00:00:00 2001 From: karim Date: Sat, 6 Jun 2026 15:34:07 +0200 Subject: [PATCH] Tools + Elements: layout per display mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Symbol only ('icon'): uniform grid (square aligned tiles) - Text / Symbol+Text: original ragged content-width pills that wrap freely (flex-wrap), like before the grid redesign - Container switches grid↔flex-wrap on mode; pill switches full-width↔auto - Dropdown picks the layout: density grid for icons, readable pills for text --- src/ElementeApp.jsx | 24 ++++++++++++++---------- src/ToolsApp.jsx | 21 +++++++++++++-------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/ElementeApp.jsx b/src/ElementeApp.jsx index 5802f82..4934fef 100644 --- a/src/ElementeApp.jsx +++ b/src/ElementeApp.jsx @@ -29,8 +29,7 @@ function readTileMode() { function writeTileMode(m) { try { localStorage.setItem(TILE_MODE_KEY, m) } catch { /* WebView ohne Storage */ } } -const TILE_MIN_COL = { icon: 40, text: 64, both: 86 } -const TILE_MIN_H = { icon: 32, text: 30, both: 32 } +const ICON_GRID_MIN = 42 // min Spaltenbreite im reinen Symbol-Raster function TileModeDropdown({ mode, onChange }) { return ( @@ -82,6 +81,7 @@ function PillButton({ icon, label, hint, onClick, onContextMenu, disabled, hasMenu, badge, mode = 'both' }) { const showIcon = mode !== 'text' const showLabel = mode !== 'icon' + const isGrid = mode === 'icon' // reines Symbol = gleichmaessiges Raster return (