diff --git a/src/App.tsx b/src/App.tsx index 7b370f6..4be2e3f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -69,7 +69,7 @@ import type { Pick3dHit } from "./viewport/Wasm3DViewport"; import { ResourceManager } from "./ui/ResourceManager"; import type { ResourceManagerHandlers } from "./ui/ResourceManager"; import { HatchSwatch } from "./ui/hatchPreview"; -import { TopBar, ViewRibbonTab, TextGroup } from "./ui/TopBar"; +import { TopBar, ViewRibbonTab } from "./ui/TopBar"; import { RibbonBar } from "./ui/ribbon/RibbonBar"; import type { RibbonTabId } from "./ui/ribbon/ribbonItems"; import { Dropdown } from "./ui/Dropdown"; @@ -359,7 +359,7 @@ export default function App() { // Aktiver Ribbon-Tab (2D/3D/BIM/Ansichten). Liegt hier (nicht in der RibbonBar), // weil die Tab-Reiter in der TopBar-Zeile sitzen und der Ribbon-Inhalt darunter // — beide teilen sich denselben aktiven Tab. - const [ribbonTab, setRibbonTab] = useState("2d"); + const [ribbonTab, setRibbonTab] = useState("views"); const [activeWallTypeId, setActiveWallTypeId] = useState( project.wallTypes[0].id, ); @@ -3232,11 +3232,6 @@ export default function App() { onSelectTool={onSelectTool} onRunCommand={onRunCommand} tabContent={{ - text: ( -
- -
- ), views: ( ), }} diff --git a/src/i18n/de.ts b/src/i18n/de.ts index 218d626..a57b977 100644 --- a/src/i18n/de.ts +++ b/src/i18n/de.ts @@ -124,7 +124,6 @@ export const de = { "ribbon.tab.2d": "2D", "ribbon.tab.3d": "3D", "ribbon.tab.bim": "BIM", - "ribbon.tab.text": "Text", "ribbon.tab.views": "Ansichten", "ribbon.group.draw": "Zeichnen", "ribbon.group.modify": "Ändern", diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 7936f2c..58e2540 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -123,7 +123,6 @@ export const en: Record = { "ribbon.tab.2d": "2D", "ribbon.tab.3d": "3D", "ribbon.tab.bim": "BIM", - "ribbon.tab.text": "Text", "ribbon.tab.views": "Views", "ribbon.group.draw": "Draw", "ribbon.group.modify": "Modify", diff --git a/src/ui/TopBar.tsx b/src/ui/TopBar.tsx index 6175a26..d3affba 100644 --- a/src/ui/TopBar.tsx +++ b/src/ui/TopBar.tsx @@ -991,6 +991,9 @@ export interface ViewRibbonTabProps { planColorMode: PlanColorMode; onPlanColorMode: (m: PlanColorMode) => void; combos: ComboMenuHandlers; + /** Text-/Font-Formatierung auf DERSELBEN Leiste (Raumstempel-Ziel; `null` = + * nur Defaults). Liegt bewusst im „Ansichten"-Tab (Nutzer-Wunsch). */ + textTarget: TextTarget | null; } /** @@ -1025,6 +1028,7 @@ export function ViewRibbonTab({ planColorMode, onPlanColorMode, combos, + textTarget, }: ViewRibbonTabProps) { // „frei" wird über einen Prompt erfasst; akzeptiert „1:35" ODER „35". const onScaleChange = (value: string) => { @@ -1248,6 +1252,12 @@ export function ViewRibbonTab({ )} + + + {/* Text-/Font-Formatierung auf DERSELBEN Leiste (Nutzer-Wunsch: Text und + Ansichten zusammen) — Stil/Schrift/Grösse + B/I/U · L/C/R + Zeilenhöhe, + formatiert das aktuelle Text-Ziel (Raumstempel) live. */} + ); } diff --git a/src/ui/ribbon/ribbonItems.ts b/src/ui/ribbon/ribbonItems.ts index 50c8b5e..07f9791 100644 --- a/src/ui/ribbon/ribbonItems.ts +++ b/src/ui/ribbon/ribbonItems.ts @@ -28,7 +28,7 @@ export interface RibbonGroup { } /** Kennung eines Ribbon-Tabs (fest, für Tab-State + i18n). */ -export type RibbonTabId = "2d" | "3d" | "bim" | "text" | "views"; +export type RibbonTabId = "views" | "2d" | "3d" | "bim"; /** Ein Ribbon-Tab: Beschriftung + gruppierte Elemente. */ export interface RibbonTab { @@ -41,12 +41,20 @@ const t = (id: ToolId): RibbonItem => ({ kind: "tool", id }); const c = (name: string): RibbonItem => ({ kind: "command", name }); /** - * Die Ribbon-Tabs (Reihenfolge 2D·3D·BIM·Ansichten). 2D (Zeichnen + Ändern) und - * BIM (Bauteile) sind datengetrieben aus Werkzeugen/Befehlen; „Ansichten" trägt - * reichen Custom-Inhalt (aus der TopBar gemergt, siehe `ViewRibbonTab` — die - * Registry lässt seine `groups` leer). 3D ist vorerst leer (spätere Phase). + * Die Ribbon-Tabs (Reihenfolge Ansichten·2D·3D·BIM). „Ansichten" ist der + * Standard-Tab (zuerst, initial aktiv) und trägt reichen Custom-Inhalt: die aus + * der TopBar gemergte Ansichts-/Zoom-/Darstellungs-Steuerung UND die Text-/Font- + * Formatierung auf DERSELBEN Leiste (`ViewRibbonTab` — `groups` bleibt leer). 2D + * (Zeichnen + Ändern) und BIM (Bauteile) sind datengetrieben aus Werkzeugen/ + * Befehlen; 3D ist vorerst leer (spätere Phase). */ export const RIBBON_TABS: RibbonTab[] = [ + { + // Custom-Inhalt (ViewRibbonTab): Ansichts-/Zoom-/Darstellungssteuerung + Text. + id: "views", + labelKey: "ribbon.tab.views", + groups: [], + }, { id: "2d", labelKey: "ribbon.tab.2d", @@ -97,15 +105,4 @@ export const RIBBON_TABS: RibbonTab[] = [ }, ], }, - { - // Custom-Inhalt: die Text-/Font-Formatierung (TextGroup), via tabContent. - id: "text", - labelKey: "ribbon.tab.text", - groups: [], - }, - { - id: "views", - labelKey: "ribbon.tab.views", - groups: [], - }, ];