From 536d42f0978259539ea96c5113f8ab0fd867f9ea Mon Sep 17 00:00:00 2001 From: karim Date: Wed, 20 May 2026 22:12:15 +0200 Subject: [PATCH] BarSelect/BarButton: bare native chrome auch im Ruhezustand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Wunsch: nicht nur das Popup, auch das Feld selber soll system-nativ aussehen. Vorher hatten die . joinedRight/joinedLeft Props bleiben akzeptiert aber sind no-ops — native Felder lassen sich nicht visuell verketten. Co-Authored-By: Claude Opus 4.7 --- src/OberleisteApp.jsx | 59 ++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/src/OberleisteApp.jsx b/src/OberleisteApp.jsx index b398843..867da81 100644 --- a/src/OberleisteApp.jsx +++ b/src/OberleisteApp.jsx @@ -84,13 +84,14 @@ const pillSelect = { fontSize: 10, } -// BarSelect: Icon roh links + System-natives . +// Kein Background, kein Border, kein Border-Radius — WebKit/macOS rendert +// seinen eigenen Combobox-Look auch im Ruhezustand (gewölbtes Feld mit +// Caret-Indikator rechts). `colorScheme: dark` triggert die Dark-Variante. // -// `colorScheme: 'dark'` triggert die macOS-Dark-Mode-Variante des nativen -// Controls. joinedRight bleibt erhalten fuer Verkettung mit BarButton. -function BarSelect({ icon, value, onChange, title, disabled, width, children, joinedRight }) { +// joinedRight bleibt als Prop drin aber als no-op — native Felder koennen +// nicht visuell mit unseren Custom-Buttons verkettet werden. +function BarSelect({ icon, value, onChange, title, disabled, width, children }) { return (
onChange(e.target.value)} style={{ height: BAR_H, width, - fontSize: 11, color: 'var(--text-primary)', - background: 'var(--bg-input)', - border: '1px solid var(--border-light)', - borderTopLeftRadius: 999, borderBottomLeftRadius: 999, - borderTopRightRadius: joinedRight ? 0 : 999, - borderBottomRightRadius: joinedRight ? 0 : 999, - borderRight: joinedRight ? 'none' : '1px solid var(--border-light)', - padding: '0 8px 0 10px', + fontSize: 11, colorScheme: 'dark', - cursor: disabled ? 'not-allowed' : 'pointer', - outline: 'none', flexShrink: 0, + flexShrink: 0, }} >{children}
) } -// BarButton: pill-foermiger Icon-Button. joinedLeft = linke Kante flach, -// so dass er nahtlos an einen BarSelect-joinedRight andockt. -function BarButton({ icon, onClick, title, disabled, joinedLeft, active }) { +// BarButton: ebenfalls system-nativer Look — bare ) } @@ -419,12 +411,9 @@ export default function OberleisteApp() { onBlur={applyDraft} style={{ height: BAR_H, width: 100, - background: 'var(--bg-input)', - border: '1px solid var(--border-light)', - borderRadius: 999, - padding: '0 12px', fontSize: 11, + fontSize: 11, fontFamily: 'DM Mono, monospace', - color: 'var(--text-primary)', outline: 'none', + colorScheme: 'dark', }} title="Massstab eingeben (Enter = uebernehmen, Esc = abbrechen)" />