From ee18f7ad3c25918ecf6bad1a1043d6a74d9d37da Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 13 Oct 2026 16:05:51 +0300 Subject: [PATCH] feat(ui): classic pull-down menu bar and ribbon toggle MENUBAR 1 shows File, Edit, View, Insert, Format, Tools, Draw, Dimension, Modify, Parametric and Help menus above the ribbon; every entry runs an existing command, and a test keeps each entry pointing at a registered command. RIBBONCLOSE hides the ribbon and RIBBON brings it back, so the menus can replace it. Both choices persist. Also translates the "File" label, which every locale had left in English. Refs #1450 Co-Authored-By: Claude Opus 5.5 --- locales/ar-SA/opencadstudio.ftl | 36 ++++- locales/bg-BG/opencadstudio.ftl | 36 ++++- locales/cs-CZ/opencadstudio.ftl | 36 ++++- locales/de-DE/opencadstudio.ftl | 36 ++++- locales/el-GR/opencadstudio.ftl | 36 ++++- locales/en-US/opencadstudio.ftl | 34 ++++ locales/es-ES/opencadstudio.ftl | 36 ++++- locales/fi-FI/opencadstudio.ftl | 36 ++++- locales/fr-FR/opencadstudio.ftl | 36 ++++- locales/hi-IN/opencadstudio.ftl | 36 ++++- locales/hu-HU/opencadstudio.ftl | 34 ++++ locales/it-IT/opencadstudio.ftl | 34 ++++ locales/ja-JP/opencadstudio.ftl | 36 ++++- locales/ko-KR/opencadstudio.ftl | 36 ++++- locales/lo-LA/opencadstudio.ftl | 34 ++++ locales/nl-NL/opencadstudio.ftl | 36 ++++- locales/pl-PL/opencadstudio.ftl | 36 ++++- locales/pt-BR/opencadstudio.ftl | 36 ++++- locales/ru-RU/opencadstudio.ftl | 36 ++++- locales/tr-TR/opencadstudio.ftl | 36 ++++- locales/zh-CN/opencadstudio.ftl | 36 ++++- locales/zh-TW/opencadstudio.ftl | 36 ++++- src/app/commands/display.rs | 5 + src/app/commands/mod.rs | 3 + src/app/commands/styleprops.rs | 13 ++ src/app/mod.rs | 6 + src/app/settings.rs | 6 + src/app/update/file.rs | 4 + src/app/view/mod.rs | 5 +- src/locale_catalog.rs | 34 ++++ src/ui/menu_bar.rs | 271 ++++++++++++++++++++++++++++++++ src/ui/mod.rs | 1 + 32 files changed, 1113 insertions(+), 19 deletions(-) create mode 100644 src/ui/menu_bar.rs diff --git a/locales/ar-SA/opencadstudio.ftl b/locales/ar-SA/opencadstudio.ftl index 7185cb3ee..e51075327 100644 --- a/locales/ar-SA/opencadstudio.ftl +++ b/locales/ar-SA/opencadstudio.ftl @@ -295,6 +295,40 @@ command-copy = .mode = COPY أدخل خيار وضع النسخ [Single/Multiple] : common = + .menu-viewports = منافذ العرض + .menu-view-twist = تدوير العرض + .menu-tools = أدوات + .menu-table-style = نمط الجدول + .menu-run-script = تشغيل نص برمجي + .menu-revision-cloud = سحابة المراجعة + .menu-regen-all = إعادة توليد الكل + .menu-redraw = إعادة الرسم + .menu-rectangle = مستطيل + .menu-quick-dimension = بُعد سريع + .menu-publish = نشر + .menu-paste-special = لصق خاص + .menu-parametric = بارامتري + .menu-page-setup-manager = مدير إعداد الصفحة + .menu-orbit = مدار + .menu-new-ucs = نظام إحداثيات مستخدم جديد + .menu-named-views = العروض المسماة + .menu-multiline-text = نص متعدد الأسطر + .menu-multiline-style = نمط الخط المتعدد المتوازي + .menu-multiline = خط متعدد متوازي + .menu-multileader-style = نمط الموجه المتعدد + .menu-match-properties = مطابقة الخصائص + .menu-lengthen = إطالة + .menu-jogged = متعرج + .menu-id-point = تعريف نقطة + .menu-explode-text = تفجير النص + .menu-edit-spline = تحرير المنحنى + .menu-edit-polyline = تحرير الخط المتعدد + .menu-edit-hatch = تحرير التظليل + .menu-drawing-limits = حدود الرسم + .menu-donut = حلقة + .menu-dimension-style = نمط الأبعاد + .menu-construction-line = خط إنشائي + .menu-arc-length = طول القوس .command-line-opacity = شفافية سطر الأوامر .txtexp-no-text-selected = TXTEXP: لم يتم تحديد نص. .angle-override-shown = تجاوز الزاوية: __ocs_fmt_0__ @@ -2072,7 +2106,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = ملف .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/bg-BG/opencadstudio.ftl b/locales/bg-BG/opencadstudio.ftl index f4e42fc76..81db75a06 100644 --- a/locales/bg-BG/opencadstudio.ftl +++ b/locales/bg-BG/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .displacement = COPY Задайте преместване: .mode = COPY Въведете режим на копиране [Single/Multiple] : common = + .menu-viewports = Прозорци + .menu-view-twist = Завъртане на изгледа + .menu-tools = Инструменти + .menu-table-style = Стил на таблица + .menu-run-script = Изпълнение на скрипт + .menu-revision-cloud = Ревизионен облак + .menu-regen-all = Регенериране на всичко + .menu-redraw = Прерисуване + .menu-rectangle = Правоъгълник + .menu-quick-dimension = Бърз размер + .menu-publish = Публикуване + .menu-paste-special = Специално поставяне + .menu-parametric = Параметрично + .menu-page-setup-manager = Диспечер на настройки на страница + .menu-orbit = Орбита + .menu-new-ucs = Нова ПКС + .menu-named-views = Именувани изгледи + .menu-multiline-text = Многоредов текст + .menu-multiline-style = Стил на мултилиния + .menu-multiline = Мултилиния + .menu-multileader-style = Стил на мултиизносна линия + .menu-match-properties = Съпоставяне на свойства + .menu-lengthen = Удължаване + .menu-jogged = Начупен + .menu-id-point = Координати на точка + .menu-explode-text = Разделяне на текст + .menu-edit-spline = Редактиране на сплайн + .menu-edit-polyline = Редактиране на полилиния + .menu-edit-hatch = Редактиране на щриховка + .menu-drawing-limits = Граници на чертежа + .menu-donut = Пръстен + .menu-dimension-style = Стил на размери + .menu-construction-line = Конструктивна линия + .menu-arc-length = Дължина на дъга .command-line-opacity = Непрозрачност на командния ред .txtexp-no-text-selected = TXTEXP: няма избран текст. .angle-override-shown = Замяна на ъгъла: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Файл .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/cs-CZ/opencadstudio.ftl b/locales/cs-CZ/opencadstudio.ftl index 7b519210e..3a73f9229 100644 --- a/locales/cs-CZ/opencadstudio.ftl +++ b/locales/cs-CZ/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Zadejte režim kopírování [Single/Multiple] : common = + .menu-viewports = Výřezy + .menu-view-twist = Natočení pohledu + .menu-tools = Nástroje + .menu-table-style = Styl tabulky + .menu-run-script = Spustit skript + .menu-revision-cloud = Revizní obláček + .menu-regen-all = Regenerovat vše + .menu-redraw = Překreslit + .menu-rectangle = Obdélník + .menu-quick-dimension = Rychlá kóta + .menu-publish = Publikovat + .menu-paste-special = Vložit jinak + .menu-parametric = Parametrické + .menu-page-setup-manager = Správce nastavení stránky + .menu-orbit = Orbit + .menu-new-ucs = Nový USS + .menu-named-views = Pojmenované pohledy + .menu-multiline-text = Víceřádkový text + .menu-multiline-style = Styl multičáry + .menu-multiline = Multičára + .menu-multileader-style = Styl vícenásobné odkazové čáry + .menu-match-properties = Přizpůsobit vlastnosti + .menu-lengthen = Prodloužit + .menu-jogged = Zalomený + .menu-id-point = Souřadnice bodu + .menu-explode-text = Rozložit text + .menu-edit-spline = Upravit splajn + .menu-edit-polyline = Upravit křivku + .menu-edit-hatch = Upravit šrafy + .menu-drawing-limits = Meze výkresu + .menu-donut = Mezikruží + .menu-dimension-style = Kótovací styl + .menu-construction-line = Konstrukční čára + .menu-arc-length = Délka oblouku .command-line-opacity = Neprůhlednost příkazového řádku .txtexp-no-text-selected = TXTEXP: není vybrán žádný text. .angle-override-shown = Přepsání úhlu: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Soubor .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/de-DE/opencadstudio.ftl b/locales/de-DE/opencadstudio.ftl index 0acdc8b7d..c36c1bcd2 100644 --- a/locales/de-DE/opencadstudio.ftl +++ b/locales/de-DE/opencadstudio.ftl @@ -283,6 +283,40 @@ command-copy = .mode = COPY Kopiermodus eingeben [Single/Multiple] : common = + .menu-viewports = Ansichtsfenster + .menu-view-twist = Ansicht verdrehen + .menu-tools = Werkzeuge + .menu-table-style = Tabellenstil + .menu-run-script = Skript ausführen + .menu-revision-cloud = Revisionswolke + .menu-regen-all = Alles regenerieren + .menu-redraw = Neuzeichnen + .menu-rectangle = Rechteck + .menu-quick-dimension = Schnellbemaßung + .menu-publish = Publizieren + .menu-paste-special = Inhalte einfügen + .menu-parametric = Parametrisch + .menu-page-setup-manager = Seiteneinrichtungs-Manager + .menu-orbit = Orbit + .menu-new-ucs = Neues BKS + .menu-named-views = Benannte Ansichten + .menu-multiline-text = Absatztext + .menu-multiline-style = Multilinienstil + .menu-multiline = Multilinie + .menu-multileader-style = Multi-Führungslinienstil + .menu-match-properties = Eigenschaften anpassen + .menu-lengthen = Länge ändern + .menu-jogged = Verkürzt + .menu-id-point = Punkt ID + .menu-explode-text = Text auflösen + .menu-edit-spline = Spline bearbeiten + .menu-edit-polyline = Polylinie bearbeiten + .menu-edit-hatch = Schraffur bearbeiten + .menu-drawing-limits = Limiten + .menu-donut = Ring + .menu-dimension-style = Bemaßungsstil + .menu-construction-line = Konstruktionslinie + .menu-arc-length = Bogenlänge .command-line-opacity = Deckkraft der Befehlszeile .txtexp-no-text-selected = TXTEXP: kein Text gewählt. .angle-override-shown = Winkelvorgabe: __ocs_fmt_0__ @@ -2060,7 +2094,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Datei .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/el-GR/opencadstudio.ftl b/locales/el-GR/opencadstudio.ftl index f2837327e..8773d3b89 100644 --- a/locales/el-GR/opencadstudio.ftl +++ b/locales/el-GR/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Επιλέξτε λειτουργία αντιγραφής [Single/Multiple] : common = + .menu-viewports = Παράθυρα προβολής + .menu-view-twist = Στρέψη όψης + .menu-tools = Εργαλεία + .menu-table-style = Στυλ πίνακα + .menu-run-script = Εκτέλεση δέσμης ενεργειών + .menu-revision-cloud = Σύννεφο αναθεώρησης + .menu-regen-all = Αναδημιουργία όλων + .menu-redraw = Επανασχεδίαση + .menu-rectangle = Ορθογώνιο + .menu-quick-dimension = Γρήγορη διάσταση + .menu-publish = Δημοσίευση + .menu-paste-special = Ειδική επικόλληση + .menu-parametric = Παραμετρικά + .menu-page-setup-manager = Διαχείριση διαμόρφωσης σελίδας + .menu-orbit = Περιστροφή + .menu-new-ucs = Νέο ΣΣΧ + .menu-named-views = Ονομασμένες όψεις + .menu-multiline-text = Κείμενο πολλών γραμμών + .menu-multiline-style = Στυλ πολλαπλής γραμμής + .menu-multiline = Πολλαπλή γραμμή + .menu-multileader-style = Στυλ πολλαπλής οδηγού + .menu-match-properties = Αντιστοίχιση ιδιοτήτων + .menu-lengthen = Επιμήκυνση + .menu-jogged = Τεθλασμένη + .menu-id-point = Αναγνώριση σημείου + .menu-explode-text = Ανάλυση κειμένου + .menu-edit-spline = Επεξεργασία καμπύλης spline + .menu-edit-polyline = Επεξεργασία πολυγραμμής + .menu-edit-hatch = Επεξεργασία διαγράμμισης + .menu-drawing-limits = Όρια σχεδίου + .menu-donut = Δακτύλιος + .menu-dimension-style = Στυλ διάστασης + .menu-construction-line = Βοηθητική γραμμή + .menu-arc-length = Μήκος τόξου .command-line-opacity = Αδιαφάνεια γραμμής εντολών .txtexp-no-text-selected = TXTEXP: δεν επιλέχθηκε κείμενο. .angle-override-shown = Παράκαμψη γωνίας: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Αρχείο .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/en-US/opencadstudio.ftl b/locales/en-US/opencadstudio.ftl index 8879adf32..bb4d45e0d 100644 --- a/locales/en-US/opencadstudio.ftl +++ b/locales/en-US/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Enter a copy mode option [Single/Multiple] : common = + .menu-viewports = Viewports + .menu-view-twist = View Twist + .menu-tools = Tools + .menu-table-style = Table Style + .menu-run-script = Run Script + .menu-revision-cloud = Revision Cloud + .menu-regen-all = Regen All + .menu-redraw = Redraw + .menu-rectangle = Rectangle + .menu-quick-dimension = Quick Dimension + .menu-publish = Publish + .menu-paste-special = Paste Special + .menu-parametric = Parametric + .menu-page-setup-manager = Page Setup Manager + .menu-orbit = Orbit + .menu-new-ucs = New UCS + .menu-named-views = Named Views + .menu-multiline-text = Multiline Text + .menu-multiline-style = Multiline Style + .menu-multiline = Multiline + .menu-multileader-style = Multileader Style + .menu-match-properties = Match Properties + .menu-lengthen = Lengthen + .menu-jogged = Jogged + .menu-id-point = ID Point + .menu-explode-text = Explode Text + .menu-edit-spline = Edit Spline + .menu-edit-polyline = Edit Polyline + .menu-edit-hatch = Edit Hatch + .menu-drawing-limits = Drawing Limits + .menu-donut = Donut + .menu-dimension-style = Dimension Style + .menu-construction-line = Construction Line + .menu-arc-length = Arc Length .command-line-opacity = Command line opacity .txtexp-no-text-selected = TXTEXP: no text selected. .angle-override-shown = Angle Override: __ocs_fmt_0__ diff --git a/locales/es-ES/opencadstudio.ftl b/locales/es-ES/opencadstudio.ftl index 0646c6190..dc784a113 100644 --- a/locales/es-ES/opencadstudio.ftl +++ b/locales/es-ES/opencadstudio.ftl @@ -283,6 +283,40 @@ command-copy = .mode = COPY Indique modo de copia [Single/Multiple] : common = + .menu-viewports = Ventanas gráficas + .menu-view-twist = Girar vista + .menu-tools = Herramientas + .menu-table-style = Estilo de tabla + .menu-run-script = Ejecutar archivo de comandos + .menu-revision-cloud = Nube de revisión + .menu-regen-all = Regenerar todo + .menu-redraw = Redibujar + .menu-rectangle = Rectángulo + .menu-quick-dimension = Acotación rápida + .menu-publish = Publicar + .menu-paste-special = Pegado especial + .menu-parametric = Paramétrico + .menu-page-setup-manager = Administrador de configuraciones de página + .menu-orbit = Órbita + .menu-new-ucs = Nuevo SCP + .menu-named-views = Vistas guardadas + .menu-multiline-text = Texto de líneas múltiples + .menu-multiline-style = Estilo de línea múltiple + .menu-multiline = Línea múltiple + .menu-multileader-style = Estilo de directriz múltiple + .menu-match-properties = Igualar propiedades + .menu-lengthen = Longitud + .menu-jogged = Con recodo + .menu-id-point = Punto ID + .menu-explode-text = Descomponer texto + .menu-edit-spline = Editar spline + .menu-edit-polyline = Editar polilínea + .menu-edit-hatch = Editar sombreado + .menu-drawing-limits = Límites del dibujo + .menu-donut = Arandela + .menu-dimension-style = Estilo de cota + .menu-construction-line = Línea auxiliar + .menu-arc-length = Longitud de arco .command-line-opacity = Opacidad de la línea de comando .txtexp-no-text-selected = TXTEXP: no se ha seleccionado ningún texto. .angle-override-shown = Modificación de ángulo: __ocs_fmt_0__ @@ -2060,7 +2094,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Archivo .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/fi-FI/opencadstudio.ftl b/locales/fi-FI/opencadstudio.ftl index 6252cbe50..f2a3cbd51 100644 --- a/locales/fi-FI/opencadstudio.ftl +++ b/locales/fi-FI/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Valitse kopiointitila [Single/Multiple] : common = + .menu-viewports = Näkymäikkunat + .menu-view-twist = Näkymän kierto + .menu-tools = Työkalut + .menu-table-style = Taulukkotyyli + .menu-run-script = Suorita skripti + .menu-revision-cloud = Revisiopilvi + .menu-regen-all = Luo kaikki uudelleen + .menu-redraw = Piirrä uudelleen + .menu-rectangle = Suorakulmio + .menu-quick-dimension = Pikamitoitus + .menu-publish = Julkaise + .menu-paste-special = Liitä määräten + .menu-parametric = Parametrinen + .menu-page-setup-manager = Sivuasetusten hallinta + .menu-orbit = Kiertorata + .menu-new-ucs = Uusi KKJ + .menu-named-views = Nimetyt näkymät + .menu-multiline-text = Monirivinen teksti + .menu-multiline-style = Monirinnakkaisviivan tyyli + .menu-multiline = Monirinnakkaisviiva + .menu-multileader-style = Monijohtoviivatyyli + .menu-match-properties = Sovita ominaisuudet + .menu-lengthen = Pidennä + .menu-jogged = Taitettu + .menu-id-point = Pisteen tunnistus + .menu-explode-text = Hajota teksti + .menu-edit-spline = Muokkaa splinia + .menu-edit-polyline = Muokkaa moniviivaa + .menu-edit-hatch = Muokkaa viivoitusta + .menu-drawing-limits = Piirustuksen rajat + .menu-donut = Rengas + .menu-dimension-style = Mitoitustyyli + .menu-construction-line = Rakenneviiva + .menu-arc-length = Kaaren pituus .command-line-opacity = Komentorivin peittävyys .txtexp-no-text-selected = TXTEXP: tekstiä ei ole valittu. .angle-override-shown = Kulman ohitus: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Tiedosto .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/fr-FR/opencadstudio.ftl b/locales/fr-FR/opencadstudio.ftl index 235debc62..2841d0540 100644 --- a/locales/fr-FR/opencadstudio.ftl +++ b/locales/fr-FR/opencadstudio.ftl @@ -283,6 +283,40 @@ command-copy = .mode = COPY Entrez le mode de copie [Single/Multiple] : common = + .menu-viewports = Fenêtres + .menu-view-twist = Rotation de la vue + .menu-tools = Outils + .menu-table-style = Style de tableau + .menu-run-script = Exécuter un script + .menu-revision-cloud = Nuage de révision + .menu-regen-all = Tout régénérer + .menu-redraw = Redessiner + .menu-rectangle = Rectangle + .menu-quick-dimension = Cotation rapide + .menu-publish = Publier + .menu-paste-special = Collage spécial + .menu-parametric = Paramétrique + .menu-page-setup-manager = Gestionnaire des mises en page + .menu-orbit = Orbite + .menu-new-ucs = Nouveau SCU + .menu-named-views = Vues nommées + .menu-multiline-text = Texte multiligne + .menu-multiline-style = Style de multiligne + .menu-multiline = Multiligne + .menu-multileader-style = Style de ligne de repère multiple + .menu-match-properties = Copier les propriétés + .menu-lengthen = Modifier la longueur + .menu-jogged = Raccourci + .menu-id-point = Point ID + .menu-explode-text = Décomposer le texte + .menu-edit-spline = Modifier la spline + .menu-edit-polyline = Modifier la polyligne + .menu-edit-hatch = Modifier les hachures + .menu-drawing-limits = Limites du dessin + .menu-donut = Anneau + .menu-dimension-style = Style de cote + .menu-construction-line = Droite de construction + .menu-arc-length = Longueur d’arc .command-line-opacity = Opacité de la ligne de commande .txtexp-no-text-selected = TXTEXP : aucun texte sélectionné. .angle-override-shown = Remplacement d’angle : __ocs_fmt_0__ @@ -2060,7 +2094,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Fichier .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/hi-IN/opencadstudio.ftl b/locales/hi-IN/opencadstudio.ftl index 8a5227f08..5de99e151 100644 --- a/locales/hi-IN/opencadstudio.ftl +++ b/locales/hi-IN/opencadstudio.ftl @@ -271,6 +271,40 @@ command-copy = .mode = COPY कॉपी मोड विकल्प दर्ज करें [Single/Multiple] : common = + .menu-viewports = व्यूपोर्ट + .menu-view-twist = दृश्य घुमाव + .menu-tools = उपकरण + .menu-table-style = तालिका शैली + .menu-run-script = स्क्रिप्ट चलाएँ + .menu-revision-cloud = संशोधन क्लाउड + .menu-regen-all = सभी पुनः उत्पन्न करें + .menu-redraw = पुनः आरेखित करें + .menu-rectangle = आयत + .menu-quick-dimension = त्वरित आयाम + .menu-publish = प्रकाशित करें + .menu-paste-special = विशेष चिपकाएँ + .menu-parametric = पैरामीट्रिक + .menu-page-setup-manager = पेज सेटअप प्रबंधक + .menu-orbit = ऑर्बिट + .menu-new-ucs = नया UCS + .menu-named-views = नामित दृश्य + .menu-multiline-text = बहु-पंक्ति टेक्स्ट + .menu-multiline-style = मल्टीलाइन शैली + .menu-multiline = मल्टीलाइन + .menu-multileader-style = मल्टीलीडर शैली + .menu-match-properties = गुण मिलाएँ + .menu-lengthen = लंबा करें + .menu-jogged = जॉग्ड + .menu-id-point = बिंदु आईडी + .menu-explode-text = टेक्स्ट विस्फोटित करें + .menu-edit-spline = स्प्लाइन संपादित करें + .menu-edit-polyline = पॉलीलाइन संपादित करें + .menu-edit-hatch = हैच संपादित करें + .menu-drawing-limits = ड्रॉइंग सीमाएँ + .menu-donut = डोनट + .menu-dimension-style = आयाम शैली + .menu-construction-line = निर्माण रेखा + .menu-arc-length = चाप लंबाई .command-line-opacity = कमांड लाइन अपारदर्शिता .txtexp-no-text-selected = TXTEXP: कोई टेक्स्ट चयनित नहीं। .angle-override-shown = कोण ओवरराइड: __ocs_fmt_0__ @@ -2048,7 +2082,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = फ़ाइल .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/hu-HU/opencadstudio.ftl b/locales/hu-HU/opencadstudio.ftl index 784bae332..5e2669521 100644 --- a/locales/hu-HU/opencadstudio.ftl +++ b/locales/hu-HU/opencadstudio.ftl @@ -281,6 +281,40 @@ command-copy = .mode = COPY Adja meg a másolási módot [Single/Multiple] : common = + .menu-viewports = Nézetablakok + .menu-view-twist = Nézet elforgatása + .menu-tools = Eszközök + .menu-table-style = Táblázatstílus + .menu-run-script = Parancsfájl futtatása + .menu-revision-cloud = Revíziófelhő + .menu-regen-all = Összes újragenerálása + .menu-redraw = Újrarajzolás + .menu-rectangle = Téglalap + .menu-quick-dimension = Gyors méretezés + .menu-publish = Közzététel + .menu-paste-special = Irányított beillesztés + .menu-parametric = Parametrikus + .menu-page-setup-manager = Oldalbeállítás-kezelő + .menu-orbit = Körbejárás + .menu-new-ucs = Új FKR + .menu-named-views = Elnevezett nézetek + .menu-multiline-text = Többsoros szöveg + .menu-multiline-style = Multivonalstílus + .menu-multiline = Multivonal + .menu-multileader-style = Többszörös mutatóvonal-stílus + .menu-match-properties = Tulajdonságok egyeztetése + .menu-lengthen = Hosszabbítás + .menu-jogged = Tört + .menu-id-point = Pont azonosítása + .menu-explode-text = Szöveg szétvetése + .menu-edit-spline = Spline szerkesztése + .menu-edit-polyline = Vonallánc szerkesztése + .menu-edit-hatch = Sraffozás szerkesztése + .menu-drawing-limits = Rajzhatárok + .menu-donut = Gyűrű + .menu-dimension-style = Méretstílus + .menu-construction-line = Szerkesztővonal + .menu-arc-length = Ívhossz .command-line-opacity = Parancssor átlátszatlansága .txtexp-no-text-selected = TXTEXP: nincs kijelölt szöveg. .angle-override-shown = Szög felülbírálása: __ocs_fmt_0__ diff --git a/locales/it-IT/opencadstudio.ftl b/locales/it-IT/opencadstudio.ftl index 83e178234..4df2fdffe 100644 --- a/locales/it-IT/opencadstudio.ftl +++ b/locales/it-IT/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Specificare modalità di copia [Single/Multiple] : common = + .menu-viewports = Finestre + .menu-view-twist = Rotazione vista + .menu-tools = Strumenti + .menu-table-style = Stile tabella + .menu-run-script = Esegui script + .menu-revision-cloud = Nuvola di revisione + .menu-regen-all = Rigenera tutto + .menu-redraw = Ridisegna + .menu-rectangle = Rettangolo + .menu-quick-dimension = Quota rapida + .menu-publish = Pubblica + .menu-paste-special = Incolla speciale + .menu-parametric = Parametrico + .menu-page-setup-manager = Gestione impostazioni pagina + .menu-orbit = Orbita + .menu-new-ucs = Nuovo UCS + .menu-named-views = Viste con nome + .menu-multiline-text = Testo multilinea + .menu-multiline-style = Stile multilinea + .menu-multiline = Multilinea + .menu-multileader-style = Stile multidirettrice + .menu-match-properties = Corrispondenza proprietà + .menu-lengthen = Allunga + .menu-jogged = Con raccordo + .menu-id-point = Punto ID + .menu-explode-text = Esplodi testo + .menu-edit-spline = Modifica spline + .menu-edit-polyline = Modifica polilinea + .menu-edit-hatch = Modifica tratteggio + .menu-drawing-limits = Limiti disegno + .menu-donut = Ciambella + .menu-dimension-style = Stile di quota + .menu-construction-line = Linea di costruzione + .menu-arc-length = Lunghezza arco .command-line-opacity = Opacità della riga di comando .txtexp-no-text-selected = TXTEXP: nessun testo selezionato. .angle-override-shown = Sostituzione angolo: __ocs_fmt_0__ diff --git a/locales/ja-JP/opencadstudio.ftl b/locales/ja-JP/opencadstudio.ftl index 4cd6bfc04..09a62ccb5 100644 --- a/locales/ja-JP/opencadstudio.ftl +++ b/locales/ja-JP/opencadstudio.ftl @@ -273,6 +273,40 @@ command-copy = .mode = COPY コピーモードを入力 [Single/Multiple] : common = + .menu-viewports = ビューポート + .menu-view-twist = ビューのねじれ + .menu-tools = ツール + .menu-table-style = 表スタイル + .menu-run-script = スクリプト実行 + .menu-revision-cloud = 雲マーク + .menu-regen-all = 全再作図 + .menu-redraw = 再描画 + .menu-rectangle = 長方形 + .menu-quick-dimension = クイック寸法 + .menu-publish = パブリッシュ + .menu-paste-special = 形式を選択して貼り付け + .menu-parametric = パラメトリック + .menu-page-setup-manager = ページ設定管理 + .menu-orbit = オービット + .menu-new-ucs = 新規 UCS + .menu-named-views = ビュー管理 + .menu-multiline-text = マルチテキスト + .menu-multiline-style = マルチライン スタイル + .menu-multiline = マルチライン + .menu-multileader-style = マルチ引出線スタイル + .menu-match-properties = プロパティコピー + .menu-lengthen = 長さ変更 + .menu-jogged = 折り曲げ + .menu-id-point = 点の座標 + .menu-explode-text = 文字を分解 + .menu-edit-spline = スプライン編集 + .menu-edit-polyline = ポリライン編集 + .menu-edit-hatch = ハッチング編集 + .menu-drawing-limits = 図面範囲 + .menu-donut = ドーナツ + .menu-dimension-style = 寸法スタイル + .menu-construction-line = 構築線 + .menu-arc-length = 弧長 .command-line-opacity = コマンドラインの不透明度 .txtexp-no-text-selected = TXTEXP: 文字が選択されていません。 .angle-override-shown = 角度の優先: __ocs_fmt_0__ @@ -2050,7 +2084,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = ファイル .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/ko-KR/opencadstudio.ftl b/locales/ko-KR/opencadstudio.ftl index aacc80b7e..88b83713c 100644 --- a/locales/ko-KR/opencadstudio.ftl +++ b/locales/ko-KR/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY 복사 모드 옵션 입력 [Single/Multiple] : common = + .menu-viewports = 뷰포트 + .menu-view-twist = 뷰 비틀기 + .menu-tools = 도구 + .menu-table-style = 테이블 스타일 + .menu-run-script = 스크립트 실행 + .menu-revision-cloud = 수정 기호 + .menu-regen-all = 모두 재생성 + .menu-redraw = 다시 그리기 + .menu-rectangle = 직사각형 + .menu-quick-dimension = 빠른 치수 + .menu-publish = 게시 + .menu-paste-special = 선택하여 붙여넣기 + .menu-parametric = 파라메트릭 + .menu-page-setup-manager = 페이지 설정 관리자 + .menu-orbit = 궤도 + .menu-new-ucs = 새 UCS + .menu-named-views = 명명된 뷰 + .menu-multiline-text = 여러 줄 문자 + .menu-multiline-style = 다중선 스타일 + .menu-multiline = 다중선 + .menu-multileader-style = 다중 지시선 스타일 + .menu-match-properties = 특성 일치 + .menu-lengthen = 길이 조정 + .menu-jogged = 꺾기 + .menu-id-point = ID 점 + .menu-explode-text = 문자 분해 + .menu-edit-spline = 스플라인 편집 + .menu-edit-polyline = 폴리선 편집 + .menu-edit-hatch = 해치 편집 + .menu-drawing-limits = 도면 한계 + .menu-donut = 도넛 + .menu-dimension-style = 치수 스타일 + .menu-construction-line = 구성선 + .menu-arc-length = 호 길이 .command-line-opacity = 명령행 불투명도 .txtexp-no-text-selected = TXTEXP: 선택된 문자가 없습니다. .angle-override-shown = 각도 재지정: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = 파일 .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/lo-LA/opencadstudio.ftl b/locales/lo-LA/opencadstudio.ftl index b6f25c0c6..bce9bc51c 100644 --- a/locales/lo-LA/opencadstudio.ftl +++ b/locales/lo-LA/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY ປ້ອນຕົວເລືອກໂໝດການຄັດລອກ [Single/Multiple] : common = + .menu-viewports = ຊ່ອງມອງ + .menu-view-twist = ບິດມຸມມອງ + .menu-tools = ເຄື່ອງມື + .menu-table-style = ຮູບແບບຕາຕະລາງ + .menu-run-script = ແລ່ນສະຄຣິບ + .menu-revision-cloud = ເມກແກ້ໄຂ + .menu-regen-all = ສ້າງຄືນທັງໝົດ + .menu-redraw = ແຕ້ມຄືນ + .menu-rectangle = ສີ່ຫຼ່ຽມ + .menu-quick-dimension = ມິຕິດ່ວນ + .menu-publish = ເຜີຍແຜ່ + .menu-paste-special = ວາງແບບພິເສດ + .menu-parametric = ພາຣາມິເຕີ + .menu-page-setup-manager = ຕົວຈັດການຕັ້ງຄ່າໜ້າ + .menu-orbit = ໝຸນວົງ + .menu-new-ucs = UCS ໃໝ່ + .menu-named-views = ມຸມມອງທີ່ຕັ້ງຊື່ + .menu-multiline-text = ຂໍ້ຄວາມຫຼາຍແຖວ + .menu-multiline-style = ຮູບແບບເສັ້ນຂະໜານ + .menu-multiline = ເສັ້ນຂະໜານ + .menu-multileader-style = ຮູບແບບເສັ້ນຊີ້ຫຼາຍ + .menu-match-properties = ຈັບຄູ່ຄຸນສົມບັດ + .menu-lengthen = ຍືດ + .menu-jogged = ຫັກ + .menu-id-point = ຈຸດ ID + .menu-explode-text = ແຍກຂໍ້ຄວາມ + .menu-edit-spline = ແກ້ໄຂ Spline + .menu-edit-polyline = ແກ້ໄຂເສັ້ນຫຼາຍທ່ອນ + .menu-edit-hatch = ແກ້ໄຂການຂີດລາຍ + .menu-drawing-limits = ຂອບເຂດແບບ + .menu-donut = ວົງແຫວນ + .menu-dimension-style = ຮູບແບບມິຕິ + .menu-construction-line = ເສັ້ນກໍ່ສ້າງ + .menu-arc-length = ຄວາມຍາວໂຄ້ງ .command-line-opacity = ຄວາມທຶບຂອງແຖວຄຳສັ່ງ .txtexp-no-text-selected = TXTEXP: ບໍ່ໄດ້ເລືອກຂໍ້ຄວາມ. .angle-override-shown = ກຳນົດມຸມແທນ: __ocs_fmt_0__ diff --git a/locales/nl-NL/opencadstudio.ftl b/locales/nl-NL/opencadstudio.ftl index 71c7cb298..366fb4e47 100644 --- a/locales/nl-NL/opencadstudio.ftl +++ b/locales/nl-NL/opencadstudio.ftl @@ -283,6 +283,40 @@ command-copy = .mode = COPY Geef kopieermodus op [Single/Multiple] : common = + .menu-viewports = Viewports + .menu-view-twist = Weergave draaien + .menu-tools = Extra + .menu-table-style = Tabelstijl + .menu-run-script = Script uitvoeren + .menu-revision-cloud = Revisiewolk + .menu-regen-all = Alles regenereren + .menu-redraw = Opnieuw tekenen + .menu-rectangle = Rechthoek + .menu-quick-dimension = Snelle maatvoering + .menu-publish = Publiceren + .menu-paste-special = Plakken speciaal + .menu-parametric = Parametrisch + .menu-page-setup-manager = Paginainstellingenbeheer + .menu-orbit = Baan + .menu-new-ucs = Nieuw GCS + .menu-named-views = Benoemde aanzichten + .menu-multiline-text = Multiline tekst + .menu-multiline-style = Multilijnstijl + .menu-multiline = Multilijn + .menu-multileader-style = Multidirectiestijl + .menu-match-properties = Eigenschappen overnemen + .menu-lengthen = Verlengen + .menu-jogged = Geknikt + .menu-id-point = Punt-ID + .menu-explode-text = Tekst exploderen + .menu-edit-spline = Spline bewerken + .menu-edit-polyline = Polylijn bewerken + .menu-edit-hatch = Arcering bewerken + .menu-drawing-limits = Tekeninglimieten + .menu-donut = Ring + .menu-dimension-style = Maatstijl + .menu-construction-line = Constructielijn + .menu-arc-length = Booglengte .command-line-opacity = Dekking van de opdrachtregel .txtexp-no-text-selected = TXTEXP: geen tekst geselecteerd. .angle-override-shown = Hoekoverschrijving: __ocs_fmt_0__ @@ -2060,7 +2094,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Bestand .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/pl-PL/opencadstudio.ftl b/locales/pl-PL/opencadstudio.ftl index 9cce07e5d..8a2b7fc0e 100644 --- a/locales/pl-PL/opencadstudio.ftl +++ b/locales/pl-PL/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY Podaj tryb kopiowania [Single/Multiple] : common = + .menu-viewports = Rzutnie + .menu-view-twist = Skręcenie widoku + .menu-tools = Narzędzia + .menu-table-style = Styl tabeli + .menu-run-script = Uruchom skrypt + .menu-revision-cloud = Chmurka rewizji + .menu-regen-all = Regeneruj wszystko + .menu-redraw = Odśwież + .menu-rectangle = Prostokąt + .menu-quick-dimension = Szybki wymiar + .menu-publish = Publikuj + .menu-paste-special = Wklej specjalnie + .menu-parametric = Parametryczne + .menu-page-setup-manager = Menedżer ustawień strony + .menu-orbit = Orbita + .menu-new-ucs = Nowy LUW + .menu-named-views = Widoki nazwane + .menu-multiline-text = Tekst wielowierszowy + .menu-multiline-style = Styl multilinii + .menu-multiline = Multilinia + .menu-multileader-style = Styl wielolinii odniesienia + .menu-match-properties = Dopasuj właściwości + .menu-lengthen = Wydłuż + .menu-jogged = Łamany + .menu-id-point = Współrzędne punktu + .menu-explode-text = Rozbij tekst + .menu-edit-spline = Edytuj splajn + .menu-edit-polyline = Edytuj polilinię + .menu-edit-hatch = Edytuj kreskowanie + .menu-drawing-limits = Granice rysunku + .menu-donut = Pierścień + .menu-dimension-style = Styl wymiarowania + .menu-construction-line = Linia konstrukcyjna + .menu-arc-length = Długość łuku .command-line-opacity = Krycie wiersza poleceń .txtexp-no-text-selected = TXTEXP: nie wybrano tekstu. .angle-override-shown = Zastąpienie kąta: __ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Plik .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/pt-BR/opencadstudio.ftl b/locales/pt-BR/opencadstudio.ftl index 03ed5c74b..811108742 100644 --- a/locales/pt-BR/opencadstudio.ftl +++ b/locales/pt-BR/opencadstudio.ftl @@ -283,6 +283,40 @@ command-copy = .mode = COPY Informe o modo de cópia [Single/Multiple] : common = + .menu-viewports = Janelas de visualização + .menu-view-twist = Girar vista + .menu-tools = Ferramentas + .menu-table-style = Estilo de tabela + .menu-run-script = Executar script + .menu-revision-cloud = Nuvem de revisão + .menu-regen-all = Regenerar tudo + .menu-redraw = Redesenhar + .menu-rectangle = Retângulo + .menu-quick-dimension = Cota rápida + .menu-publish = Publicar + .menu-paste-special = Colar especial + .menu-parametric = Paramétrico + .menu-page-setup-manager = Gerenciador de configuração de página + .menu-orbit = Órbita + .menu-new-ucs = Novo UCS + .menu-named-views = Vistas nomeadas + .menu-multiline-text = Texto multilinha + .menu-multiline-style = Estilo de multilinha + .menu-multiline = Multilinha + .menu-multileader-style = Estilo de multidirecionador + .menu-match-properties = Corresponder propriedades + .menu-lengthen = Alongar + .menu-jogged = Com quebra + .menu-id-point = Ponto ID + .menu-explode-text = Explodir texto + .menu-edit-spline = Editar spline + .menu-edit-polyline = Editar polilinha + .menu-edit-hatch = Editar hachura + .menu-drawing-limits = Limites do desenho + .menu-donut = Rosca + .menu-dimension-style = Estilo de cota + .menu-construction-line = Linha de construção + .menu-arc-length = Comprimento do arco .command-line-opacity = Opacidade da linha de comando .txtexp-no-text-selected = TXTEXP: nenhum texto selecionado. .angle-override-shown = Substituição de ângulo: __ocs_fmt_0__ @@ -2060,7 +2094,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Arquivo .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/ru-RU/opencadstudio.ftl b/locales/ru-RU/opencadstudio.ftl index f86a8bdf2..521533e4f 100644 --- a/locales/ru-RU/opencadstudio.ftl +++ b/locales/ru-RU/opencadstudio.ftl @@ -286,6 +286,40 @@ command-copy = .mode = COPY Задайте режим копирования [Single/Multiple] : common = + .menu-viewports = Видовые экраны + .menu-view-twist = Поворот вида + .menu-tools = Сервис + .menu-table-style = Стиль таблиц + .menu-run-script = Запустить сценарий + .menu-revision-cloud = Облако + .menu-regen-all = Регенерировать все + .menu-redraw = Освежить + .menu-rectangle = Прямоугольник + .menu-quick-dimension = Быстрый размер + .menu-publish = Публикация + .menu-paste-special = Специальная вставка + .menu-parametric = Параметризация + .menu-page-setup-manager = Диспетчер параметров листов + .menu-orbit = Орбита + .menu-new-ucs = Новая ПСК + .menu-named-views = Именованные виды + .menu-multiline-text = Многострочный текст + .menu-multiline-style = Стиль мультилинии + .menu-multiline = Мультилиния + .menu-multileader-style = Стиль мультивыноски + .menu-match-properties = Копировать свойства + .menu-lengthen = Увеличить + .menu-jogged = С изломом + .menu-id-point = Координаты точки + .menu-explode-text = Расчленить текст + .menu-edit-spline = Редактировать сплайн + .menu-edit-polyline = Редактировать полилинию + .menu-edit-hatch = Редактировать штриховку + .menu-drawing-limits = Лимиты чертежа + .menu-donut = Кольцо + .menu-dimension-style = Размерный стиль + .menu-construction-line = Вспомогательная прямая + .menu-arc-length = Длина дуги .command-line-opacity = Непрозрачность командной строки .txtexp-no-text-selected = TXTEXP: текст не выбран. .angle-override-shown = Переопределение угла: __ocs_fmt_0__ @@ -2063,7 +2097,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Файл .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/tr-TR/opencadstudio.ftl b/locales/tr-TR/opencadstudio.ftl index c2e968dba..d0fcca985 100644 --- a/locales/tr-TR/opencadstudio.ftl +++ b/locales/tr-TR/opencadstudio.ftl @@ -268,6 +268,40 @@ command-copy = .mode = COPY Kopyalama modu seçin [Single/Multiple] : common = + .menu-viewports = Görünüm Pencereleri + .menu-view-twist = Görünümü Döndür + .menu-tools = Araçlar + .menu-table-style = Tablo Stili + .menu-run-script = Komut Dosyası Çalıştır + .menu-revision-cloud = Revizyon Bulutu + .menu-regen-all = Tümünü Yenile + .menu-redraw = Yeniden Çiz + .menu-rectangle = Dikdörtgen + .menu-quick-dimension = Hızlı Ölçü + .menu-publish = Yayımla + .menu-paste-special = Özel Yapıştır + .menu-parametric = Parametrik + .menu-page-setup-manager = Sayfa Düzeni Yöneticisi + .menu-orbit = Yörünge + .menu-new-ucs = Yeni KKS + .menu-named-views = Adlandırılmış Görünümler + .menu-multiline-text = Çok Satırlı Metin + .menu-multiline-style = Çoklu Çizgi Stili + .menu-multiline = Çoklu Çizgi + .menu-multileader-style = Çoklu Ok Stili + .menu-match-properties = Özellikleri Eşle + .menu-lengthen = Uzat + .menu-jogged = Kırık + .menu-id-point = Nokta Kimliği + .menu-explode-text = Metni Patlat + .menu-edit-spline = Eğriyi Düzenle + .menu-edit-polyline = Çoklu Çizgiyi Düzenle + .menu-edit-hatch = Taramayı Düzenle + .menu-drawing-limits = Çizim Sınırları + .menu-donut = Halka + .menu-dimension-style = Ölçü Stili + .menu-construction-line = Yapı Çizgisi + .menu-arc-length = Yay Uzunluğu .command-line-opacity = Komut satırı opaklığı .txtexp-no-text-selected = TXTEXP: metin seçilmedi. .angle-override-shown = Açı geçersiz kılma: __ocs_fmt_0__ @@ -2044,7 +2078,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = Dosya .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/zh-CN/opencadstudio.ftl b/locales/zh-CN/opencadstudio.ftl index 11c90021c..280d09775 100644 --- a/locales/zh-CN/opencadstudio.ftl +++ b/locales/zh-CN/opencadstudio.ftl @@ -270,6 +270,40 @@ command-copy = .mode = COPY 输入复制模式选项 [Single/Multiple] : common = + .menu-viewports = 视口 + .menu-view-twist = 视图扭曲 + .menu-tools = 工具 + .menu-table-style = 表格样式 + .menu-run-script = 运行脚本 + .menu-revision-cloud = 修订云线 + .menu-regen-all = 全部重生成 + .menu-redraw = 重画 + .menu-rectangle = 矩形 + .menu-quick-dimension = 快速标注 + .menu-publish = 发布 + .menu-paste-special = 选择性粘贴 + .menu-parametric = 参数化 + .menu-page-setup-manager = 页面设置管理器 + .menu-orbit = 动态观察 + .menu-new-ucs = 新建 UCS + .menu-named-views = 命名视图 + .menu-multiline-text = 多行文字 + .menu-multiline-style = 多线样式 + .menu-multiline = 多线 + .menu-multileader-style = 多重引线样式 + .menu-match-properties = 特性匹配 + .menu-lengthen = 拉长 + .menu-jogged = 折弯 + .menu-id-point = 点坐标 + .menu-explode-text = 分解文字 + .menu-edit-spline = 编辑样条曲线 + .menu-edit-polyline = 编辑多段线 + .menu-edit-hatch = 编辑图案填充 + .menu-drawing-limits = 图形界限 + .menu-donut = 圆环 + .menu-dimension-style = 标注样式 + .menu-construction-line = 构造线 + .menu-arc-length = 弧长 .command-line-opacity = 命令行不透明度 .txtexp-no-text-selected = TXTEXP: 未选择文字。 .angle-override-shown = 角度替代:__ocs_fmt_0__ @@ -2047,7 +2081,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = 文件 .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/locales/zh-TW/opencadstudio.ftl b/locales/zh-TW/opencadstudio.ftl index e51fe693a..40f7b2c13 100644 --- a/locales/zh-TW/opencadstudio.ftl +++ b/locales/zh-TW/opencadstudio.ftl @@ -282,6 +282,40 @@ command-copy = .mode = COPY 輸入複製模式選項 [Single/Multiple] : common = + .menu-viewports = 視埠 + .menu-view-twist = 視圖扭轉 + .menu-tools = 工具 + .menu-table-style = 表格型式 + .menu-run-script = 執行腳本 + .menu-revision-cloud = 修訂雲形 + .menu-regen-all = 全部重生 + .menu-redraw = 重畫 + .menu-rectangle = 矩形 + .menu-quick-dimension = 快速標註 + .menu-publish = 發佈 + .menu-paste-special = 選擇性貼上 + .menu-parametric = 參數式 + .menu-page-setup-manager = 頁面設置管理員 + .menu-orbit = 環轉 + .menu-new-ucs = 新 UCS + .menu-named-views = 具名視圖 + .menu-multiline-text = 多行文字 + .menu-multiline-style = 複線型式 + .menu-multiline = 複線 + .menu-multileader-style = 多重引線型式 + .menu-match-properties = 複製性質 + .menu-lengthen = 調整長度 + .menu-jogged = 轉折 + .menu-id-point = 點座標 + .menu-explode-text = 分解文字 + .menu-edit-spline = 編輯雲形線 + .menu-edit-polyline = 編輯聚合線 + .menu-edit-hatch = 編輯填充線 + .menu-drawing-limits = 圖面範圍 + .menu-donut = 環 + .menu-dimension-style = 標註型式 + .menu-construction-line = 建構線 + .menu-arc-length = 弧長 .command-line-opacity = 命令列不透明度 .txtexp-no-text-selected = TXTEXP: 未選擇文字。 .angle-override-shown = 角度取代:__ocs_fmt_0__ @@ -2059,7 +2093,7 @@ common = .fillet-select-first-object-or-polyline-radius-r = FILLET Select first object or [Polyline/Radius] [R=__ocs_fmt_0__]: .fillet-specify-fillet-radius-or-first-point = FILLET Specify fillet radius or first point <__ocs_fmt_0__>: .fillet-specify-second-point-for-radius = FILLET Specify second point for radius: - .file = File + .file = 檔案 .file-not-found-check-the-saved-path = File not found — check the saved path. .first-row = First row .fit-data-cannot-be-purged-without-a-stored-control-curve = Fit data cannot be purged without a stored control curve. diff --git a/src/app/commands/display.rs b/src/app/commands/display.rs index c48af2cbf..0364e6a45 100644 --- a/src/app/commands/display.rs +++ b/src/app/commands/display.rs @@ -618,6 +618,11 @@ impl OpenCADStudio { "CLEANSCREEN" => { return Some(Task::done(Message::ToggleCleanScreen)); } + // ── RIBBON / RIBBONCLOSE — show or hide the ribbon ─────────────────── + "RIBBON" | "RIBBONCLOSE" => { + self.ribbon_closed = cmd == "RIBBONCLOSE"; + self.persist_settings_if_changed(); + } // ── QUICKPROPERTIES — toggle the floating quick-properties readout ─── "QUICKPROPERTIES" => { return Some(Task::done(Message::ToggleQuickProperties)); diff --git a/src/app/commands/mod.rs b/src/app/commands/mod.rs index 07afbcdd8..062c2a6a7 100644 --- a/src/app/commands/mod.rs +++ b/src/app/commands/mod.rs @@ -755,6 +755,9 @@ inventory::submit!(crate::command::CommandRegistration { "CLIPROMPTLINES", "COMMANDLINEFADETIME", "COMMANDLINEOPACITY", + "MENUBAR", + "RIBBON", + "RIBBONCLOSE", "COLORTHEME", "SELECTIONAREA", "SELECTIONAREAOPACITY", diff --git a/src/app/commands/styleprops.rs b/src/app/commands/styleprops.rs index b7706ed43..fcf75ec7d 100644 --- a/src/app/commands/styleprops.rs +++ b/src/app/commands/styleprops.rs @@ -1150,6 +1150,7 @@ impl OpenCADStudio { | "PICKBOX" | "HPASSOC" | "COMMANDLINEOPACITY" + | "MENUBAR" | "CURSORTYPE" | "SNAPANG" | "TEXTFILL" @@ -2190,6 +2191,17 @@ impl OpenCADStudio { }, None => Ok((format!("PICKBOX = {}", self.pick_box), false)), }, + "MENUBAR" => match value.as_deref() { + Some(v @ ("0" | "1")) => { + self.show_menu_bar = v == "1"; + Ok((format!("MENUBAR = {v}"), true)) + } + Some(_) => Err("SETVAR: 0 or 1 required.".into()), + None => Ok(( + format!("MENUBAR = {}", u8::from(self.show_menu_bar)), + false, + )), + }, "HPASSOC" => match value.as_deref() { Some(v @ ("0" | "1")) => { self.hatch_associative = v == "1"; @@ -3165,6 +3177,7 @@ impl OpenCADStudio { | "PICKBOX" | "HPASSOC" | "COMMANDLINEOPACITY" + | "MENUBAR" | "CURSORTYPE" | "SNAPANG" | "CLIPROMPTLINES" diff --git a/src/app/mod.rs b/src/app/mod.rs index 3e012f7d0..91872fe56 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -642,6 +642,10 @@ pub(super) struct OpenCADStudio { pick_box: i32, /// HPASSOC: new hatches follow their boundary objects. hatch_associative: bool, + /// MENUBAR: the classic pull-down menus show above the ribbon. + show_menu_bar: bool, + /// RIBBONCLOSE hid the ribbon; RIBBON brings it back. + ribbon_closed: bool, /// Use REFEDIT rather than BEDIT when double-clicking an attribute-free block. double_click_block_refedit: bool, /// Open ATTEDIT when double-clicking a block with attributes. @@ -4543,6 +4547,8 @@ impl OpenCADStudio { cursor_size: 5, pick_box: 3, hatch_associative: true, + show_menu_bar: false, + ribbon_closed: false, double_click_block_refedit: false, double_click_block_attedit: true, right_click_mode: settings::RightClickMode::ShortcutMenu, diff --git a/src/app/settings.rs b/src/app/settings.rs index 8db980e2e..4a89769fd 100644 --- a/src/app/settings.rs +++ b/src/app/settings.rs @@ -400,6 +400,10 @@ pub struct UserSettings { pub pick_box: i32, /// HPASSOC: new hatches follow their boundary objects. pub hatch_associative: bool, + /// MENUBAR: the classic pull-down menus show above the ribbon. + pub show_menu_bar: bool, + /// RIBBONCLOSE hid the ribbon; RIBBON brings it back. + pub ribbon_closed: bool, /// When true, double-clicking a block reference starts REFEDIT instead of BEDIT. pub double_click_block_refedit: bool, /// When true, double-clicking a block with attributes opens ATTEDIT. @@ -834,6 +838,8 @@ impl Default for UserSettings { cursor_size: 5, pick_box: 3, hatch_associative: true, + show_menu_bar: false, + ribbon_closed: false, options_tab: crate::ui::window::options::OptionsTab::General, show_viewcube: true, show_ucs_icon: true, diff --git a/src/app/update/file.rs b/src/app/update/file.rs index e516b0fd2..ea3564a4c 100644 --- a/src/app/update/file.rs +++ b/src/app/update/file.rs @@ -781,6 +781,8 @@ impl OpenCADStudio { cursor_size: self.cursor_size, pick_box: self.pick_box, hatch_associative: self.hatch_associative, + show_menu_bar: self.show_menu_bar, + ribbon_closed: self.ribbon_closed, options_tab: self.options_tab, show_viewcube: self.show_viewcube, show_ucs_icon: self.show_ucs_icon, @@ -894,6 +896,8 @@ impl OpenCADStudio { self.cursor_size = s.cursor_size.clamp(1, 100); self.pick_box = s.pick_box.clamp(0, 50); self.hatch_associative = s.hatch_associative; + self.show_menu_bar = s.show_menu_bar; + self.ribbon_closed = s.ribbon_closed; self.options_tab = s.options_tab; self.spacemouse_preferences = s.spacemouse; // These four drive real features with commands and status-bar pills, diff --git a/src/app/view/mod.rs b/src/app/view/mod.rs index 62df6afcf..d6515b5e1 100644 --- a/src/app/view/mod.rs +++ b/src/app/view/mod.rs @@ -2020,7 +2020,10 @@ bg={bg_ms:.1}ms n={view_count}" // Clean-screen mode drops the ribbon for a full-canvas view; the // status bar stays so the mode can be toggled back off. let mut col = column![]; - if !self.clean_screen { + if !self.clean_screen && self.show_menu_bar { + col = col.push(crate::ui::menu_bar::view()); + } + if !self.clean_screen && !self.ribbon_closed { col = col.push(self.ribbon.view( is_paper, self.tabs[self.active_tab].is_start, diff --git a/src/locale_catalog.rs b/src/locale_catalog.rs index b4ce7052f..831ba2a40 100644 --- a/src/locale_catalog.rs +++ b/src/locale_catalog.rs @@ -3697,6 +3697,40 @@ pub(super) fn message_attribute(source: &str) -> Option<(&'static str, &'static "Width factor" => Some(("common", "width-factor-sentence-case")), "Width: %{value}" => Some(("ui", "width-value")), "Window" => Some(("common", "window")), + "Arc Length" => Some(("common", "menu-arc-length")), + "Construction Line" => Some(("common", "menu-construction-line")), + "Dimension Style" => Some(("common", "menu-dimension-style")), + "Donut" => Some(("common", "menu-donut")), + "Drawing Limits" => Some(("common", "menu-drawing-limits")), + "Edit Hatch" => Some(("common", "menu-edit-hatch")), + "Edit Polyline" => Some(("common", "menu-edit-polyline")), + "Edit Spline" => Some(("common", "menu-edit-spline")), + "Explode Text" => Some(("common", "menu-explode-text")), + "ID Point" => Some(("common", "menu-id-point")), + "Jogged" => Some(("common", "menu-jogged")), + "Lengthen" => Some(("common", "menu-lengthen")), + "Match Properties" => Some(("common", "menu-match-properties")), + "Multileader Style" => Some(("common", "menu-multileader-style")), + "Multiline" => Some(("common", "menu-multiline")), + "Multiline Style" => Some(("common", "menu-multiline-style")), + "Multiline Text" => Some(("common", "menu-multiline-text")), + "Named Views" => Some(("common", "menu-named-views")), + "New UCS" => Some(("common", "menu-new-ucs")), + "Orbit" => Some(("common", "menu-orbit")), + "Page Setup Manager" => Some(("common", "menu-page-setup-manager")), + "Parametric" => Some(("common", "menu-parametric")), + "Paste Special" => Some(("common", "menu-paste-special")), + "Publish" => Some(("common", "menu-publish")), + "Quick Dimension" => Some(("common", "menu-quick-dimension")), + "Rectangle" => Some(("common", "menu-rectangle")), + "Redraw" => Some(("common", "menu-redraw")), + "Regen All" => Some(("common", "menu-regen-all")), + "Revision Cloud" => Some(("common", "menu-revision-cloud")), + "Run Script" => Some(("common", "menu-run-script")), + "Table Style" => Some(("common", "menu-table-style")), + "Tools" => Some(("common", "menu-tools")), + "View Twist" => Some(("common", "menu-view-twist")), + "Viewports" => Some(("common", "menu-viewports")), "Command line opacity" => Some(("common", "command-line-opacity")), "TXTEXP: no text selected." => Some(("common", "txtexp-no-text-selected")), "Windows desktop" => Some(("styles", "windows-desktop")), diff --git a/src/ui/menu_bar.rs b/src/ui/menu_bar.rs new file mode 100644 index 000000000..682e1b523 --- /dev/null +++ b/src/ui/menu_bar.rs @@ -0,0 +1,271 @@ +//! Classic pull-down menus above the ribbon (MENUBAR 1). Every entry runs a +//! command, so the menus stay a view of the command set rather than a second +//! implementation of it. + +use crate::app::Message; +use iced::widget::{button, container, text}; +use iced::{Background, Border, Element, Fill, Theme}; +use iced_aw::menu::{Item, Menu, MenuBar}; + +type Entries = &'static [(&'static str, &'static str)]; + +/// Menu title and its (label, command) entries, in menu-bar order. +const MENUS: &[(&str, Entries)] = &[ + ( + "File", + &[ + ("New", "QNEW"), + ("Open", "OPEN"), + ("Close", "CLOSE"), + ("Save", "QSAVE"), + ("Save As", "SAVEAS"), + ("Page Setup Manager", "PAGESETUP"), + ("Plot", "PLOT"), + ("Publish", "PUBLISH"), + ("Audit", "AUDIT"), + ("Purge", "PURGE"), + ("Exit", "QUIT"), + ], + ), + ( + "Edit", + &[ + ("Undo", "UNDO"), + ("Redo", "REDO"), + ("Cut", "CUTCLIP"), + ("Copy", "COPYCLIP"), + ("Copy with Base Point", "COPYBASE"), + ("Paste", "PASTECLIP"), + ("Paste as Block", "PASTEBLOCK"), + ("Paste to Original Coordinates", "PASTEORIG"), + ("Paste Special", "PASTESPEC"), + ("Erase", "ERASE"), + ("Find and Replace", "FIND"), + ], + ), + ( + "View", + &[ + ("Redraw", "REDRAW"), + ("Regen", "REGEN"), + ("Regen All", "REGENALL"), + ("Zoom", "ZOOM"), + ("Pan", "PAN"), + ("Orbit", "3DORBIT"), + ("Named Views", "VIEW"), + ("View Twist", "DVIEW"), + ("Viewports", "VPORTS"), + ("Clean Screen", "CLEANSCREEN"), + ], + ), + ( + "Insert", + &[ + ("Block", "INSERT"), + ("External References", "EXTERNALREFERENCES"), + ("Raster Image", "IMAGEATTACH"), + ("PDF Underlay", "PDFATTACH"), + ("Field", "FIELD"), + ("Hyperlink", "HYPERLINK"), + ], + ), + ( + "Format", + &[ + ("Layer", "LAYER"), + ("Color", "COLOR"), + ("Linetype", "LINETYPE"), + ("Text Style", "STYLE"), + ("Dimension Style", "DIMSTYLE"), + ("Table Style", "TABLESTYLE"), + ("Multileader Style", "MLEADERSTYLE"), + ("Multiline Style", "MLSTYLE"), + ("Point Style", "PTYPE"), + ("Units", "UNITS"), + ("Drawing Limits", "LIMITS"), + ], + ), + ( + "Tools", + &[ + ("Quick Select", "QSELECT"), + ("Draw Order", "DRAWORDER"), + ("Distance", "DIST"), + ("Area", "AREA"), + ("List", "LIST"), + ("ID Point", "ID"), + ("Run Script", "SCRIPT"), + ("New UCS", "UCS"), + ("Drafting Settings", "DSETTINGS"), + ("Options", "OPTIONS"), + ], + ), + ( + "Draw", + &[ + ("Line", "LINE"), + ("Ray", "RAY"), + ("Construction Line", "XLINE"), + ("Multiline", "MLINE"), + ("Polyline", "PLINE"), + ("3D Polyline", "3DPOLY"), + ("Polygon", "POLYGON"), + ("Rectangle", "RECTANG"), + ("Arc", "ARC"), + ("Circle", "CIRCLE"), + ("Donut", "DONUT"), + ("Spline", "SPLINE"), + ("Ellipse", "ELLIPSE"), + ("Block", "BLOCK"), + ("Table", "TABLE"), + ("Point", "POINT"), + ("Hatch", "HATCH"), + ("Boundary", "BOUNDARY"), + ("Region", "REGION"), + ("Wipeout", "WIPEOUT"), + ("Revision Cloud", "REVCLOUD"), + ("Text", "TEXT"), + ("Multiline Text", "MTEXT"), + ], + ), + ( + "Dimension", + &[ + ("Quick Dimension", "QDIM"), + ("Linear", "DIMLINEAR"), + ("Aligned", "DIMALIGNED"), + ("Arc Length", "DIMARC"), + ("Ordinate", "DIMORDINATE"), + ("Radius", "DIMRADIUS"), + ("Jogged", "DIMJOGGED"), + ("Diameter", "DIMDIAMETER"), + ("Angular", "DIMANGULAR"), + ("Baseline", "DIMBASELINE"), + ("Continue", "DIMCONTINUE"), + ("Multileader", "MLEADER"), + ("Tolerance", "TOLERANCE"), + ("Center Mark", "DIMCENTER"), + ("Dimension Style", "DIMSTYLE"), + ], + ), + ( + "Modify", + &[ + ("Properties", "PROPERTIES"), + ("Match Properties", "MATCHPROP"), + ("Erase", "ERASE"), + ("Copy", "COPY"), + ("Mirror", "MIRROR"), + ("Offset", "OFFSET"), + ("Array", "ARRAY"), + ("Move", "MOVE"), + ("Rotate", "ROTATE"), + ("Scale", "SCALE"), + ("Stretch", "STRETCH"), + ("Lengthen", "LENGTHEN"), + ("Trim", "TRIM"), + ("Extend", "EXTEND"), + ("Break", "BREAK"), + ("Join", "JOIN"), + ("Chamfer", "CHAMFER"), + ("Fillet", "FILLET"), + ("Explode", "EXPLODE"), + ("Explode Text", "TXTEXP"), + ("Edit Polyline", "PEDIT"), + ("Edit Spline", "SPLINEDIT"), + ("Edit Hatch", "HATCHEDIT"), + ], + ), + ( + "Parametric", + &[ + ("Auto Constrain", "AUTOCONSTRAIN"), + ("Coincident", "GCCOINCIDENT"), + ("Parallel", "PCONSTRAINT"), + ("Perpendicular", "GCPERPENDICULAR"), + ("Horizontal", "GCHORIZONTAL"), + ("Vertical", "GCVERTICAL"), + ("Tangent", "TCONSTRAINT"), + ("Equal", "GCEQUAL"), + ("Fix", "GCFIX"), + ("Dimensional", "DIMCONSTRAINT"), + ("Delete Constraints", "DELCONSTRAINT"), + ("Parameters Manager", "PARAMETERS"), + ], + ), + ("Help", &[("Help", "HELP"), ("About", "ABOUT")]), +]; + +fn entry_style(theme: &Theme, status: button::Status) -> button::Style { + let palette = theme.palette(); + let pair = match status { + button::Status::Hovered | button::Status::Pressed => palette.primary.weak, + _ => palette.background.base, + }; + button::Style { + background: Some(Background::Color(pair.color)), + text_color: pair.text, + ..Default::default() + } +} + +/// The menu bar, one pull-down per menu. +pub fn view<'a>() -> Element<'a, Message> { + let roots = MENUS + .iter() + .map(|&(title, entries)| { + let items = entries + .iter() + .map(|&(label, command)| { + Item::new( + button(text(crate::t!(label).into_owned()).size(12)) + .on_press(Message::Command(command.to_string())) + .style(entry_style) + .padding([4, 12]) + .width(Fill), + ) + }) + .collect(); + Item::with_menu( + container(text(crate::t!(title).into_owned()).size(12)).padding([3, 8]), + Menu::new(items).width(240.0).offset(2.0), + ) + }) + .collect(); + MenuBar::new(roots) + .close_on_item_click_global(true) + .style(|theme: &Theme, _| { + let palette = theme.palette(); + iced_aw::style::menu_bar::Style { + bar_background: Background::Color(palette.background.weakest.color), + bar_border: Border::default(), + bar_shadow: Default::default(), + menu_background: Background::Color(palette.background.base.color), + menu_border: Border { + color: palette.background.strong.color, + width: 1.0, + radius: 3.0.into(), + }, + menu_shadow: Default::default(), + path: Background::Color(palette.primary.weak.color), + path_border: Border::default(), + } + }) + .width(Fill) + .into() +} + +#[cfg(test)] +mod tests { + #[test] + fn every_menu_entry_runs_a_known_command() { + let mut known = crate::command::all_registered_command_names(); + known.extend(["UNDO", "REDO", "QSAVE", "OPEN", "ZOOM"]); + let unknown: Vec<_> = super::MENUS + .iter() + .flat_map(|(_, entries)| entries.iter()) + .filter(|(_, command)| !known.contains(command)) + .collect(); + assert!(unknown.is_empty(), "{unknown:?}"); + } +} diff --git a/src/ui/mod.rs b/src/ui/mod.rs index b3220ae32..1cf35b847 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -8,6 +8,7 @@ pub mod dock; pub mod icons; pub mod modal; pub mod node_graph; +pub mod menu_bar; pub mod overlay; pub mod popup; pub mod properties;