diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 9fc0733..1eed740 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -7,3 +7,5 @@ Flutter/Dart 依赖及解析版本记录在 `pubspec.yaml`、内部包的 `pubsp 应用发行包捆绑的媒体处理库、推理工具和模型遵循各自的许可与再分发要求。打包时保留随附的许可证和通知文件;不能用本仓库的 MIT 许可替代。 仓库中的测试不附带个人媒体或模型。新增第三方素材、字体或代码时,应一同记录来源和许可证,并保留要求的版权声明。 + +桌面属性栏使用 [Inter 4.1](https://github.com/rsms/inter/releases/tag/v4.1) 的可变字体,遵循 SIL Open Font License 1.1。原始字体与版权声明保存在 `packages/cutdex_ui/assets/fonts/InterVariable.ttf` 和 `INTER_LICENSE.txt` 中。 diff --git a/lib/features/timeline/timeline_panel.dart b/lib/features/timeline/timeline_panel.dart index 1fb0bfa..3361940 100644 --- a/lib/features/timeline/timeline_panel.dart +++ b/lib/features/timeline/timeline_panel.dart @@ -411,7 +411,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { controller: _scrollController, scrollDirection: Axis.horizontal, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), child: Row( children: [ for ( @@ -419,7 +419,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { index < widget.timelines.length; index++ ) ...[ - if (index > 0) const SizedBox(width: AppSpacing.hairline), + if (index > 0) const SizedBox(width: AppSpacing.tiny), _buildTab(context, widget.timelines[index]), ], ], @@ -497,7 +497,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { ), Padding( padding: EdgeInsetsDirectional.only( - end: desktop ? AppSpacing.tiny : 0, + end: desktop ? AppSpacing.small : 0, ), child: listButton, ), @@ -538,7 +538,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> { ), ], child: Padding( - padding: const EdgeInsets.symmetric(vertical: 3), + padding: const EdgeInsets.symmetric(vertical: 4), child: Semantics( selected: selected, child: ConstrainedBox( @@ -934,7 +934,9 @@ class _TimelineEditorState extends State<_TimelineEditor> { ? AppDesktopMetrics.timelineToolbar : 32, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric( + horizontal: AppSpacing.medium, + ), child: AppCommandToolbar( groups: [ [ diff --git a/lib/features/timeline/timeline_speed_editor.dart b/lib/features/timeline/timeline_speed_editor.dart index 2f47387..5e1df92 100644 --- a/lib/features/timeline/timeline_speed_editor.dart +++ b/lib/features/timeline/timeline_speed_editor.dart @@ -148,12 +148,9 @@ class TimelineSpeedEditor extends StatelessWidget { } for (var index = 0; index < frame.length; index++) { - if (frame.kindAt(index) == TimelineViewportItemKind.transition) { - continue; - } - final identity = frame.identityAt(index); - final handle = controller.elementForIdentity(identity); + final handle = controller.elementForFrameItem(frame, index); if (handle == null) continue; + final identity = frame.identityAt(index); final bodyId = identity is LayoutBodyId ? identity : LayoutBodyId.element(handle); diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 74896a1..9f872b8 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Name: Z bis A", "mediaSelectedCount": "{count} ausgewählt", "navigationHome": "Startseite", + "workflow": "Arbeitsablauf", + "workflowDescription": "Organisiere und verwalte hier deine Bearbeitungsabläufe.", "mediaThumbnailSize": "Vorschaubildgröße", "mediaThumbnailSmall": "Kleine Vorschaubilder", "mediaThumbnailMedium": "Mittlere Vorschaubilder", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Eckenradius", + "shadow": "Schatten", + "addShadow": "Schatten hinzufügen", + "shadowLayer": "Schatten {number}", + "shadowBlur": "Unschärfe", + "shadowSpread": "Ausbreitung", + "shadowOpacity": "Deckkraft", + "moveShadowUp": "Nach oben", + "moveShadowDown": "Nach unten", + "updateShadowFailed": "Schatten konnte nicht aktualisiert werden", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Einzelne Ecken", + "cornerTopLeft": "Radius oben links", + "cornerTopRight": "Radius oben rechts", + "cornerBottomRight": "Radius unten rechts", + "cornerBottomLeft": "Radius unten links" } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index c3383d9..5e6b913 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1373,6 +1373,8 @@ } }, "navigationHome": "Home", + "workflow": "Workflow", + "workflowDescription": "Organize and manage your editing workflows here.", "mediaThumbnailSize": "Thumbnail size", "mediaThumbnailSmall": "Small thumbnails", "mediaThumbnailMedium": "Medium thumbnails", @@ -1391,5 +1393,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Corner radius", + "shadow": "Shadow", + "addShadow": "Add shadow", + "shadowLayer": "Shadow {number}", + "shadowBlur": "Blur", + "shadowSpread": "Spread", + "shadowOpacity": "Opacity", + "moveShadowUp": "Move up", + "moveShadowDown": "Move down", + "updateShadowFailed": "Could not update shadow", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Independent corners", + "cornerTopLeft": "Top left radius", + "cornerTopRight": "Top right radius", + "cornerBottomRight": "Bottom right radius", + "cornerBottomLeft": "Bottom left radius" } diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index 69efc7f..d46550b 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nombre: Z a A", "mediaSelectedCount": "{count} seleccionados", "navigationHome": "Inicio", + "workflow": "Flujo de trabajo", + "workflowDescription": "Organiza y gestiona aquí tus flujos de trabajo de edición.", "mediaThumbnailSize": "Tamaño de miniatura", "mediaThumbnailSmall": "Miniaturas pequeñas", "mediaThumbnailMedium": "Miniaturas medianas", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Radio de esquina", + "shadow": "Sombra", + "addShadow": "Añadir sombra", + "shadowLayer": "Sombra {number}", + "shadowBlur": "Desenfoque", + "shadowSpread": "Extensión", + "shadowOpacity": "Opacidad", + "moveShadowUp": "Subir", + "moveShadowDown": "Bajar", + "updateShadowFailed": "No se pudo actualizar la sombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Esquinas independientes", + "cornerTopLeft": "Radio superior izquierdo", + "cornerTopRight": "Radio superior derecho", + "cornerBottomRight": "Radio inferior derecho", + "cornerBottomLeft": "Radio inferior izquierdo" } diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index fb747de..14cb96d 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nom : Z à A", "mediaSelectedCount": "{count} sélectionnés", "navigationHome": "Accueil", + "workflow": "Flux de travail", + "workflowDescription": "Organisez et gérez vos flux de travail de montage ici.", "mediaThumbnailSize": "Taille des vignettes", "mediaThumbnailSmall": "Petites vignettes", "mediaThumbnailMedium": "Vignettes moyennes", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Rayon des coins", + "shadow": "Ombre", + "addShadow": "Ajouter une ombre", + "shadowLayer": "Ombre {number}", + "shadowBlur": "Flou", + "shadowSpread": "Expansion", + "shadowOpacity": "Opacité", + "moveShadowUp": "Monter", + "moveShadowDown": "Descendre", + "updateShadowFailed": "Impossible de modifier l’ombre", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Coins indépendants", + "cornerTopLeft": "Rayon supérieur gauche", + "cornerTopRight": "Rayon supérieur droit", + "cornerBottomRight": "Rayon inférieur droit", + "cornerBottomLeft": "Rayon inférieur gauche" } diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index d35bb63..2f13853 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nome: Z–A", "mediaSelectedCount": "{count} selezionati", "navigationHome": "Home", + "workflow": "Flusso di lavoro", + "workflowDescription": "Organizza e gestisci qui i tuoi flussi di lavoro di editing.", "mediaThumbnailSize": "Dimensione miniature", "mediaThumbnailSmall": "Miniature piccole", "mediaThumbnailMedium": "Miniature medie", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Raggio angoli", + "shadow": "Ombra", + "addShadow": "Aggiungi ombra", + "shadowLayer": "Ombra {number}", + "shadowBlur": "Sfocatura", + "shadowSpread": "Espansione", + "shadowOpacity": "Opacità", + "moveShadowUp": "Sposta su", + "moveShadowDown": "Sposta giù", + "updateShadowFailed": "Impossibile aggiornare l’ombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Angoli indipendenti", + "cornerTopLeft": "Raggio in alto a sinistra", + "cornerTopRight": "Raggio in alto a destra", + "cornerBottomRight": "Raggio in basso a destra", + "cornerBottomLeft": "Raggio in basso a sinistra" } diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index bd1025c..032a6be 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名前の降順", "mediaSelectedCount": "{count} 個選択", "navigationHome": "ホーム", + "workflow": "ワークフロー", + "workflowDescription": "編集ワークフローをここで整理、管理できます。", "mediaThumbnailSize": "サムネイルサイズ", "mediaThumbnailSmall": "小さいサムネイル", "mediaThumbnailMedium": "中サイズのサムネイル", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "角の半径", + "shadow": "シャドウ", + "addShadow": "シャドウを追加", + "shadowLayer": "シャドウ {number}", + "shadowBlur": "ぼかし", + "shadowSpread": "広がり", + "shadowOpacity": "不透明度", + "moveShadowUp": "上へ移動", + "moveShadowDown": "下へ移動", + "updateShadowFailed": "シャドウを更新できません", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "角を個別に設定", + "cornerTopLeft": "左上の半径", + "cornerTopRight": "右上の半径", + "cornerBottomRight": "右下の半径", + "cornerBottomLeft": "左下の半径" } diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index 19ad9cd..204c050 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "이름 내림차순", "mediaSelectedCount": "{count}개 선택됨", "navigationHome": "홈", + "workflow": "워크플로", + "workflowDescription": "여기에서 편집 워크플로를 구성하고 관리하세요.", "mediaThumbnailSize": "썸네일 크기", "mediaThumbnailSmall": "작은 썸네일", "mediaThumbnailMedium": "중간 썸네일", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "모서리 반경", + "shadow": "그림자", + "addShadow": "그림자 추가", + "shadowLayer": "그림자 {number}", + "shadowBlur": "흐림", + "shadowSpread": "확산", + "shadowOpacity": "불투명도", + "moveShadowUp": "위로 이동", + "moveShadowDown": "아래로 이동", + "updateShadowFailed": "그림자를 업데이트할 수 없습니다", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "모서리 개별 설정", + "cornerTopLeft": "왼쪽 위 반경", + "cornerTopRight": "오른쪽 위 반경", + "cornerBottomRight": "오른쪽 아래 반경", + "cornerBottomLeft": "왼쪽 아래 반경" } diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index cc648fd..a177016 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -4250,6 +4250,18 @@ abstract class AppLocalizations { /// **'Home'** String get navigationHome; + /// No description provided for @workflow. + /// + /// In en, this message translates to: + /// **'Workflow'** + String get workflow; + + /// No description provided for @workflowDescription. + /// + /// In en, this message translates to: + /// **'Organize and manage your editing workflows here.'** + String get workflowDescription; + /// No description provided for @mediaThumbnailSize. /// /// In en, this message translates to: @@ -4321,6 +4333,96 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Imported audio is in My media.'** String get resourceImportedAudioHint; + + /// No description provided for @cornerRadius. + /// + /// In en, this message translates to: + /// **'Corner radius'** + String get cornerRadius; + + /// No description provided for @shadow. + /// + /// In en, this message translates to: + /// **'Shadow'** + String get shadow; + + /// No description provided for @addShadow. + /// + /// In en, this message translates to: + /// **'Add shadow'** + String get addShadow; + + /// No description provided for @shadowLayer. + /// + /// In en, this message translates to: + /// **'Shadow {number}'** + String shadowLayer(int number); + + /// No description provided for @shadowBlur. + /// + /// In en, this message translates to: + /// **'Blur'** + String get shadowBlur; + + /// No description provided for @shadowSpread. + /// + /// In en, this message translates to: + /// **'Spread'** + String get shadowSpread; + + /// No description provided for @shadowOpacity. + /// + /// In en, this message translates to: + /// **'Opacity'** + String get shadowOpacity; + + /// No description provided for @moveShadowUp. + /// + /// In en, this message translates to: + /// **'Move up'** + String get moveShadowUp; + + /// No description provided for @moveShadowDown. + /// + /// In en, this message translates to: + /// **'Move down'** + String get moveShadowDown; + + /// No description provided for @updateShadowFailed. + /// + /// In en, this message translates to: + /// **'Could not update shadow'** + String get updateShadowFailed; + + /// No description provided for @independentCorners. + /// + /// In en, this message translates to: + /// **'Independent corners'** + String get independentCorners; + + /// No description provided for @cornerTopLeft. + /// + /// In en, this message translates to: + /// **'Top left radius'** + String get cornerTopLeft; + + /// No description provided for @cornerTopRight. + /// + /// In en, this message translates to: + /// **'Top right radius'** + String get cornerTopRight; + + /// No description provided for @cornerBottomRight. + /// + /// In en, this message translates to: + /// **'Bottom right radius'** + String get cornerBottomRight; + + /// No description provided for @cornerBottomLeft. + /// + /// In en, this message translates to: + /// **'Bottom left radius'** + String get cornerBottomLeft; } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index c17442d..9d52ba0 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -2312,6 +2312,13 @@ class AppLocalizationsDe extends AppLocalizations { @override String get navigationHome => 'Startseite'; + @override + String get workflow => 'Arbeitsablauf'; + + @override + String get workflowDescription => + 'Organisiere und verwalte hier deine Bearbeitungsabläufe.'; + @override String get mediaThumbnailSize => 'Vorschaubildgröße'; @@ -2350,4 +2357,51 @@ class AppLocalizationsDe extends AppLocalizations { @override String get resourceImportedAudioHint => 'Importiertes Audio befindet sich in Meine Medien.'; + + @override + String get cornerRadius => 'Eckenradius'; + + @override + String get shadow => 'Schatten'; + + @override + String get addShadow => 'Schatten hinzufügen'; + + @override + String shadowLayer(int number) { + return 'Schatten $number'; + } + + @override + String get shadowBlur => 'Unschärfe'; + + @override + String get shadowSpread => 'Ausbreitung'; + + @override + String get shadowOpacity => 'Deckkraft'; + + @override + String get moveShadowUp => 'Nach oben'; + + @override + String get moveShadowDown => 'Nach unten'; + + @override + String get updateShadowFailed => 'Schatten konnte nicht aktualisiert werden'; + + @override + String get independentCorners => 'Einzelne Ecken'; + + @override + String get cornerTopLeft => 'Radius oben links'; + + @override + String get cornerTopRight => 'Radius oben rechts'; + + @override + String get cornerBottomRight => 'Radius unten rechts'; + + @override + String get cornerBottomLeft => 'Radius unten links'; } diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 64502dc..a6a7a9e 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -2277,6 +2277,13 @@ class AppLocalizationsEn extends AppLocalizations { @override String get navigationHome => 'Home'; + @override + String get workflow => 'Workflow'; + + @override + String get workflowDescription => + 'Organize and manage your editing workflows here.'; + @override String get mediaThumbnailSize => 'Thumbnail size'; @@ -2314,4 +2321,51 @@ class AppLocalizationsEn extends AppLocalizations { @override String get resourceImportedAudioHint => 'Imported audio is in My media.'; + + @override + String get cornerRadius => 'Corner radius'; + + @override + String get shadow => 'Shadow'; + + @override + String get addShadow => 'Add shadow'; + + @override + String shadowLayer(int number) { + return 'Shadow $number'; + } + + @override + String get shadowBlur => 'Blur'; + + @override + String get shadowSpread => 'Spread'; + + @override + String get shadowOpacity => 'Opacity'; + + @override + String get moveShadowUp => 'Move up'; + + @override + String get moveShadowDown => 'Move down'; + + @override + String get updateShadowFailed => 'Could not update shadow'; + + @override + String get independentCorners => 'Independent corners'; + + @override + String get cornerTopLeft => 'Top left radius'; + + @override + String get cornerTopRight => 'Top right radius'; + + @override + String get cornerBottomRight => 'Bottom right radius'; + + @override + String get cornerBottomLeft => 'Bottom left radius'; } diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 17505c1..d93a332 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -2311,6 +2311,13 @@ class AppLocalizationsEs extends AppLocalizations { @override String get navigationHome => 'Inicio'; + @override + String get workflow => 'Flujo de trabajo'; + + @override + String get workflowDescription => + 'Organiza y gestiona aquí tus flujos de trabajo de edición.'; + @override String get mediaThumbnailSize => 'Tamaño de miniatura'; @@ -2349,4 +2356,51 @@ class AppLocalizationsEs extends AppLocalizations { @override String get resourceImportedAudioHint => 'El audio importado está en Mis medios.'; + + @override + String get cornerRadius => 'Radio de esquina'; + + @override + String get shadow => 'Sombra'; + + @override + String get addShadow => 'Añadir sombra'; + + @override + String shadowLayer(int number) { + return 'Sombra $number'; + } + + @override + String get shadowBlur => 'Desenfoque'; + + @override + String get shadowSpread => 'Extensión'; + + @override + String get shadowOpacity => 'Opacidad'; + + @override + String get moveShadowUp => 'Subir'; + + @override + String get moveShadowDown => 'Bajar'; + + @override + String get updateShadowFailed => 'No se pudo actualizar la sombra'; + + @override + String get independentCorners => 'Esquinas independientes'; + + @override + String get cornerTopLeft => 'Radio superior izquierdo'; + + @override + String get cornerTopRight => 'Radio superior derecho'; + + @override + String get cornerBottomRight => 'Radio inferior derecho'; + + @override + String get cornerBottomLeft => 'Radio inferior izquierdo'; } diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index e90e827..6ec6480 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -2314,6 +2314,13 @@ class AppLocalizationsFr extends AppLocalizations { @override String get navigationHome => 'Accueil'; + @override + String get workflow => 'Flux de travail'; + + @override + String get workflowDescription => + 'Organisez et gérez vos flux de travail de montage ici.'; + @override String get mediaThumbnailSize => 'Taille des vignettes'; @@ -2352,4 +2359,51 @@ class AppLocalizationsFr extends AppLocalizations { @override String get resourceImportedAudioHint => 'Les fichiers audio importés sont dans Mes médias.'; + + @override + String get cornerRadius => 'Rayon des coins'; + + @override + String get shadow => 'Ombre'; + + @override + String get addShadow => 'Ajouter une ombre'; + + @override + String shadowLayer(int number) { + return 'Ombre $number'; + } + + @override + String get shadowBlur => 'Flou'; + + @override + String get shadowSpread => 'Expansion'; + + @override + String get shadowOpacity => 'Opacité'; + + @override + String get moveShadowUp => 'Monter'; + + @override + String get moveShadowDown => 'Descendre'; + + @override + String get updateShadowFailed => 'Impossible de modifier l’ombre'; + + @override + String get independentCorners => 'Coins indépendants'; + + @override + String get cornerTopLeft => 'Rayon supérieur gauche'; + + @override + String get cornerTopRight => 'Rayon supérieur droit'; + + @override + String get cornerBottomRight => 'Rayon inférieur droit'; + + @override + String get cornerBottomLeft => 'Rayon inférieur gauche'; } diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 93eb538..95f807f 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -2304,6 +2304,13 @@ class AppLocalizationsIt extends AppLocalizations { @override String get navigationHome => 'Home'; + @override + String get workflow => 'Flusso di lavoro'; + + @override + String get workflowDescription => + 'Organizza e gestisci qui i tuoi flussi di lavoro di editing.'; + @override String get mediaThumbnailSize => 'Dimensione miniature'; @@ -2342,4 +2349,51 @@ class AppLocalizationsIt extends AppLocalizations { @override String get resourceImportedAudioHint => 'L’audio importato si trova in I miei media.'; + + @override + String get cornerRadius => 'Raggio angoli'; + + @override + String get shadow => 'Ombra'; + + @override + String get addShadow => 'Aggiungi ombra'; + + @override + String shadowLayer(int number) { + return 'Ombra $number'; + } + + @override + String get shadowBlur => 'Sfocatura'; + + @override + String get shadowSpread => 'Espansione'; + + @override + String get shadowOpacity => 'Opacità'; + + @override + String get moveShadowUp => 'Sposta su'; + + @override + String get moveShadowDown => 'Sposta giù'; + + @override + String get updateShadowFailed => 'Impossibile aggiornare l’ombra'; + + @override + String get independentCorners => 'Angoli indipendenti'; + + @override + String get cornerTopLeft => 'Raggio in alto a sinistra'; + + @override + String get cornerTopRight => 'Raggio in alto a destra'; + + @override + String get cornerBottomRight => 'Raggio in basso a destra'; + + @override + String get cornerBottomLeft => 'Raggio in basso a sinistra'; } diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index d3343e6..fef74b5 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -2212,6 +2212,12 @@ class AppLocalizationsJa extends AppLocalizations { @override String get navigationHome => 'ホーム'; + @override + String get workflow => 'ワークフロー'; + + @override + String get workflowDescription => '編集ワークフローをここで整理、管理できます。'; + @override String get mediaThumbnailSize => 'サムネイルサイズ'; @@ -2249,4 +2255,51 @@ class AppLocalizationsJa extends AppLocalizations { @override String get resourceImportedAudioHint => '読み込んだ音声は「マイメディア」にあります。'; + + @override + String get cornerRadius => '角の半径'; + + @override + String get shadow => 'シャドウ'; + + @override + String get addShadow => 'シャドウを追加'; + + @override + String shadowLayer(int number) { + return 'シャドウ $number'; + } + + @override + String get shadowBlur => 'ぼかし'; + + @override + String get shadowSpread => '広がり'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上へ移動'; + + @override + String get moveShadowDown => '下へ移動'; + + @override + String get updateShadowFailed => 'シャドウを更新できません'; + + @override + String get independentCorners => '角を個別に設定'; + + @override + String get cornerTopLeft => '左上の半径'; + + @override + String get cornerTopRight => '右上の半径'; + + @override + String get cornerBottomRight => '右下の半径'; + + @override + String get cornerBottomLeft => '左下の半径'; } diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 9f509f7..508acab 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -2212,6 +2212,12 @@ class AppLocalizationsKo extends AppLocalizations { @override String get navigationHome => '홈'; + @override + String get workflow => '워크플로'; + + @override + String get workflowDescription => '여기에서 편집 워크플로를 구성하고 관리하세요.'; + @override String get mediaThumbnailSize => '썸네일 크기'; @@ -2249,4 +2255,51 @@ class AppLocalizationsKo extends AppLocalizations { @override String get resourceImportedAudioHint => '가져온 오디오는 내 미디어에 있습니다.'; + + @override + String get cornerRadius => '모서리 반경'; + + @override + String get shadow => '그림자'; + + @override + String get addShadow => '그림자 추가'; + + @override + String shadowLayer(int number) { + return '그림자 $number'; + } + + @override + String get shadowBlur => '흐림'; + + @override + String get shadowSpread => '확산'; + + @override + String get shadowOpacity => '불투명도'; + + @override + String get moveShadowUp => '위로 이동'; + + @override + String get moveShadowDown => '아래로 이동'; + + @override + String get updateShadowFailed => '그림자를 업데이트할 수 없습니다'; + + @override + String get independentCorners => '모서리 개별 설정'; + + @override + String get cornerTopLeft => '왼쪽 위 반경'; + + @override + String get cornerTopRight => '오른쪽 위 반경'; + + @override + String get cornerBottomRight => '오른쪽 아래 반경'; + + @override + String get cornerBottomLeft => '왼쪽 아래 반경'; } diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 085346d..da5572c 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -2304,6 +2304,13 @@ class AppLocalizationsPt extends AppLocalizations { @override String get navigationHome => 'Início'; + @override + String get workflow => 'Fluxo de trabalho'; + + @override + String get workflowDescription => + 'Organize e gerencie seus fluxos de trabalho de edição aqui.'; + @override String get mediaThumbnailSize => 'Tamanho das miniaturas'; @@ -2342,4 +2349,51 @@ class AppLocalizationsPt extends AppLocalizations { @override String get resourceImportedAudioHint => 'O áudio importado está em Minha mídia.'; + + @override + String get cornerRadius => 'Raio dos cantos'; + + @override + String get shadow => 'Sombra'; + + @override + String get addShadow => 'Adicionar sombra'; + + @override + String shadowLayer(int number) { + return 'Sombra $number'; + } + + @override + String get shadowBlur => 'Desfoque'; + + @override + String get shadowSpread => 'Expansão'; + + @override + String get shadowOpacity => 'Opacidade'; + + @override + String get moveShadowUp => 'Mover para cima'; + + @override + String get moveShadowDown => 'Mover para baixo'; + + @override + String get updateShadowFailed => 'Não foi possível atualizar a sombra'; + + @override + String get independentCorners => 'Cantos independentes'; + + @override + String get cornerTopLeft => 'Raio superior esquerdo'; + + @override + String get cornerTopRight => 'Raio superior direito'; + + @override + String get cornerBottomRight => 'Raio inferior direito'; + + @override + String get cornerBottomLeft => 'Raio inferior esquerdo'; } diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index c9955a6..913252a 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -2297,6 +2297,13 @@ class AppLocalizationsRu extends AppLocalizations { @override String get navigationHome => 'Главная'; + @override + String get workflow => 'Рабочий процесс'; + + @override + String get workflowDescription => + 'Здесь можно организовывать рабочие процессы монтажа.'; + @override String get mediaThumbnailSize => 'Размер миниатюр'; @@ -2335,4 +2342,51 @@ class AppLocalizationsRu extends AppLocalizations { @override String get resourceImportedAudioHint => 'Импортированное аудио находится в разделе «Мои медиа».'; + + @override + String get cornerRadius => 'Радиус углов'; + + @override + String get shadow => 'Тень'; + + @override + String get addShadow => 'Добавить тень'; + + @override + String shadowLayer(int number) { + return 'Тень $number'; + } + + @override + String get shadowBlur => 'Размытие'; + + @override + String get shadowSpread => 'Расширение'; + + @override + String get shadowOpacity => 'Непрозрачность'; + + @override + String get moveShadowUp => 'Вверх'; + + @override + String get moveShadowDown => 'Вниз'; + + @override + String get updateShadowFailed => 'Не удалось обновить тень'; + + @override + String get independentCorners => 'Отдельные углы'; + + @override + String get cornerTopLeft => 'Радиус слева сверху'; + + @override + String get cornerTopRight => 'Радиус справа сверху'; + + @override + String get cornerBottomRight => 'Радиус справа снизу'; + + @override + String get cornerBottomLeft => 'Радиус слева снизу'; } diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 4321dc4..6b5ea49 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -2169,6 +2169,12 @@ class AppLocalizationsZh extends AppLocalizations { @override String get navigationHome => '首页'; + @override + String get workflow => '工作流'; + + @override + String get workflowDescription => '在这里编排和管理剪辑工作流。'; + @override String get mediaThumbnailSize => '缩略图大小'; @@ -2206,6 +2212,53 @@ class AppLocalizationsZh extends AppLocalizations { @override String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; + + @override + String get cornerRadius => '圆角'; + + @override + String get shadow => '阴影'; + + @override + String get addShadow => '添加阴影'; + + @override + String shadowLayer(int number) { + return '阴影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '扩展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '无法更新阴影'; + + @override + String get independentCorners => '独立圆角'; + + @override + String get cornerTopLeft => '左上圆角'; + + @override + String get cornerTopRight => '右上圆角'; + + @override + String get cornerBottomRight => '右下圆角'; + + @override + String get cornerBottomLeft => '左下圆角'; } /// The translations for Chinese, using the Han script (`zh_Hans`). @@ -4372,6 +4425,12 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { @override String get navigationHome => '首页'; + @override + String get workflow => '工作流'; + + @override + String get workflowDescription => '在这里编排和管理剪辑工作流。'; + @override String get mediaThumbnailSize => '缩略图大小'; @@ -4409,6 +4468,53 @@ class AppLocalizationsZhHans extends AppLocalizationsZh { @override String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; + + @override + String get cornerRadius => '圆角'; + + @override + String get shadow => '阴影'; + + @override + String get addShadow => '添加阴影'; + + @override + String shadowLayer(int number) { + return '阴影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '扩展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '无法更新阴影'; + + @override + String get independentCorners => '独立圆角'; + + @override + String get cornerTopLeft => '左上圆角'; + + @override + String get cornerTopRight => '右上圆角'; + + @override + String get cornerBottomRight => '右下圆角'; + + @override + String get cornerBottomLeft => '左下圆角'; } /// The translations for Chinese, using the Han script (`zh_Hant`). @@ -6575,6 +6681,12 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { @override String get navigationHome => '首頁'; + @override + String get workflow => '工作流程'; + + @override + String get workflowDescription => '在這裡編排和管理剪輯工作流程。'; + @override String get mediaThumbnailSize => '縮圖大小'; @@ -6612,4 +6724,51 @@ class AppLocalizationsZhHant extends AppLocalizationsZh { @override String get resourceImportedAudioHint => '匯入的音訊可在「我的素材」中找到。'; + + @override + String get cornerRadius => '圓角'; + + @override + String get shadow => '陰影'; + + @override + String get addShadow => '新增陰影'; + + @override + String shadowLayer(int number) { + return '陰影 $number'; + } + + @override + String get shadowBlur => '模糊'; + + @override + String get shadowSpread => '擴展'; + + @override + String get shadowOpacity => '不透明度'; + + @override + String get moveShadowUp => '上移'; + + @override + String get moveShadowDown => '下移'; + + @override + String get updateShadowFailed => '無法更新陰影'; + + @override + String get independentCorners => '獨立圓角'; + + @override + String get cornerTopLeft => '左上圓角'; + + @override + String get cornerTopRight => '右上圓角'; + + @override + String get cornerBottomRight => '右下圓角'; + + @override + String get cornerBottomLeft => '左下圓角'; } diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index 0bb8e72..15add09 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Nome: Z a A", "mediaSelectedCount": "{count} selecionados", "navigationHome": "Início", + "workflow": "Fluxo de trabalho", + "workflowDescription": "Organize e gerencie seus fluxos de trabalho de edição aqui.", "mediaThumbnailSize": "Tamanho das miniaturas", "mediaThumbnailSmall": "Miniaturas pequenas", "mediaThumbnailMedium": "Miniaturas médias", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Raio dos cantos", + "shadow": "Sombra", + "addShadow": "Adicionar sombra", + "shadowLayer": "Sombra {number}", + "shadowBlur": "Desfoque", + "shadowSpread": "Expansão", + "shadowOpacity": "Opacidade", + "moveShadowUp": "Mover para cima", + "moveShadowDown": "Mover para baixo", + "updateShadowFailed": "Não foi possível atualizar a sombra", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Cantos independentes", + "cornerTopLeft": "Raio superior esquerdo", + "cornerTopRight": "Raio superior direito", + "cornerBottomRight": "Raio inferior direito", + "cornerBottomLeft": "Raio inferior esquerdo" } diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index 0c55c6c..6a07a7a 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "Имя: Я–А", "mediaSelectedCount": "Выбрано: {count}", "navigationHome": "Главная", + "workflow": "Рабочий процесс", + "workflowDescription": "Здесь можно организовывать рабочие процессы монтажа.", "mediaThumbnailSize": "Размер миниатюр", "mediaThumbnailSmall": "Маленькие миниатюры", "mediaThumbnailMedium": "Средние миниатюры", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "Радиус углов", + "shadow": "Тень", + "addShadow": "Добавить тень", + "shadowLayer": "Тень {number}", + "shadowBlur": "Размытие", + "shadowSpread": "Расширение", + "shadowOpacity": "Непрозрачность", + "moveShadowUp": "Вверх", + "moveShadowDown": "Вниз", + "updateShadowFailed": "Не удалось обновить тень", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "Отдельные углы", + "cornerTopLeft": "Радиус слева сверху", + "cornerTopRight": "Радиус справа сверху", + "cornerBottomRight": "Радиус справа снизу", + "cornerBottomLeft": "Радиус слева снизу" } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 3824894..b988e29 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名称降序", "mediaSelectedCount": "已选 {count} 个", "navigationHome": "首页", + "workflow": "工作流", + "workflowDescription": "在这里编排和管理剪辑工作流。", "mediaThumbnailSize": "缩略图大小", "mediaThumbnailSmall": "小缩略图", "mediaThumbnailMedium": "中缩略图", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圆角", + "shadow": "阴影", + "addShadow": "添加阴影", + "shadowLayer": "阴影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "扩展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "无法更新阴影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "独立圆角", + "cornerTopLeft": "左上圆角", + "cornerTopRight": "右上圆角", + "cornerBottomRight": "右下圆角", + "cornerBottomLeft": "左下圆角" } diff --git a/lib/l10n/app_zh_Hans.arb b/lib/l10n/app_zh_Hans.arb index f0b243b..04521cf 100644 --- a/lib/l10n/app_zh_Hans.arb +++ b/lib/l10n/app_zh_Hans.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名称降序", "mediaSelectedCount": "已选 {count} 个", "navigationHome": "首页", + "workflow": "工作流", + "workflowDescription": "在这里编排和管理剪辑工作流。", "mediaThumbnailSize": "缩略图大小", "mediaThumbnailSmall": "小缩略图", "mediaThumbnailMedium": "中缩略图", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圆角", + "shadow": "阴影", + "addShadow": "添加阴影", + "shadowLayer": "阴影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "扩展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "无法更新阴影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "独立圆角", + "cornerTopLeft": "左上圆角", + "cornerTopRight": "右上圆角", + "cornerBottomRight": "右下圆角", + "cornerBottomLeft": "左下圆角" } diff --git a/lib/l10n/app_zh_Hant.arb b/lib/l10n/app_zh_Hant.arb index 4adaa13..064ea76 100644 --- a/lib/l10n/app_zh_Hant.arb +++ b/lib/l10n/app_zh_Hant.arb @@ -913,6 +913,8 @@ "mediaSortNameDescending": "名稱降冪", "mediaSelectedCount": "已選 {count} 個", "navigationHome": "首頁", + "workflow": "工作流程", + "workflowDescription": "在這裡編排和管理剪輯工作流程。", "mediaThumbnailSize": "縮圖大小", "mediaThumbnailSmall": "小縮圖", "mediaThumbnailMedium": "中縮圖", @@ -931,5 +933,27 @@ "type": "String" } } - } + }, + "cornerRadius": "圓角", + "shadow": "陰影", + "addShadow": "新增陰影", + "shadowLayer": "陰影 {number}", + "shadowBlur": "模糊", + "shadowSpread": "擴展", + "shadowOpacity": "不透明度", + "moveShadowUp": "上移", + "moveShadowDown": "下移", + "updateShadowFailed": "無法更新陰影", + "@shadowLayer": { + "placeholders": { + "number": { + "type": "int" + } + } + }, + "independentCorners": "獨立圓角", + "cornerTopLeft": "左上圓角", + "cornerTopRight": "右上圓角", + "cornerBottomRight": "右下圓角", + "cornerBottomLeft": "左下圓角" } diff --git a/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt b/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt new file mode 100644 index 0000000..9b2ca37 --- /dev/null +++ b/packages/cutdex_ui/assets/fonts/INTER_LICENSE.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/packages/cutdex_ui/assets/fonts/InterVariable.ttf b/packages/cutdex_ui/assets/fonts/InterVariable.ttf new file mode 100644 index 0000000..4ab79e0 Binary files /dev/null and b/packages/cutdex_ui/assets/fonts/InterVariable.ttf differ diff --git a/packages/cutdex_ui/lib/src/icons/app_icons.dart b/packages/cutdex_ui/lib/src/icons/app_icons.dart index 2152103..cc08fa7 100644 --- a/packages/cutdex_ui/lib/src/icons/app_icons.dart +++ b/packages/cutdex_ui/lib/src/icons/app_icons.dart @@ -63,6 +63,8 @@ abstract final class AppIcons { static const IconData unlock = PhosphorIconsRegular.lockOpen; static const IconData fullscreen = PhosphorIconsRegular.arrowsOut; static const IconData exitFullscreen = PhosphorIconsRegular.arrowsIn; + static const IconData independentCorners = PhosphorIconsRegular.cornersOut; + static const IconData cornerRadius = PhosphorIconsRegular.rectangle; static const IconData fitContent = PhosphorIconsRegular.cornersIn; static const IconData menu = PhosphorIconsRegular.list; static const IconData sidebar = PhosphorIconsRegular.sidebarSimple; diff --git a/packages/cutdex_ui/lib/src/theme/app_theme.dart b/packages/cutdex_ui/lib/src/theme/app_theme.dart index 7c20beb..2e7d190 100644 --- a/packages/cutdex_ui/lib/src/theme/app_theme.dart +++ b/packages/cutdex_ui/lib/src/theme/app_theme.dart @@ -174,8 +174,10 @@ abstract final class AppTheme { : null, textStyle: WidgetStatePropertyAll( theme.textTheme.labelLarge?.copyWith( - fontSize: desktop ? 13 : 12, - height: 1.3, + fontSize: desktop ? AppInspectorMetrics.fontSize : 12, + height: desktop + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : 1.3, fontWeight: desktop && selected ? FontWeight.w500 : FontWeight.w400, fontVariations: desktop ? [FontVariation('wght', selected ? 500 : 400)] @@ -188,14 +190,14 @@ abstract final class AppTheme { foregroundColor: WidgetStatePropertyAll( selected ? desktop - ? colors.primary + ? colors.onSurface : colors.onSurface : colors.onSurfaceVariant, ), backgroundColor: WidgetStatePropertyAll( selected ? desktop - ? colors.primary.withValues(alpha: .12) + ? colors.surfaceContainer : colors.onSurface.withValues(alpha: .05) : Colors.transparent, ), @@ -255,6 +257,9 @@ abstract final class AppTheme { static Color comboboxBackground(BuildContext context) { final theme = Theme.of(context); + if (isCompactInspector(context)) { + return theme.inputDecorationTheme.fillColor!; + } return theme.brightness == Brightness.dark ? theme.colorScheme.surfaceContainerHighest.withValues(alpha: .3) : Colors.transparent; @@ -374,34 +379,12 @@ abstract final class AppTheme { /// Desktop inspectors use a denser scale than dialogs and settings. static ThemeData propertiesPanelTheme(ThemeData theme) { final desktop = theme.extension() != null; + if (desktop) return _desktopPropertiesPanelTheme(theme); final colors = theme.colorScheme; - final panelText = desktop - ? theme.textTheme.copyWith( - bodyMedium: theme.textTheme.bodyMedium?.copyWith( - fontSize: 13, - height: 20 / 13, - leadingDistribution: TextLeadingDistribution.even, - ), - bodySmall: theme.textTheme.bodySmall?.copyWith( - fontSize: 12, - height: 16 / 12, - leadingDistribution: TextLeadingDistribution.even, - ), - ) - : theme.textTheme; - final actionSize = desktop - ? AppInspectorMetrics.action - : AppControlSize.propertyControl; + final panelText = theme.textTheme; + const actionSize = AppControlSize.propertyControl; ButtonStyle? buttonStyle(ButtonStyle? style) => style?.copyWith( textStyle: WidgetStatePropertyAll(panelText.labelLarge), - minimumSize: desktop - ? const WidgetStatePropertyAll(Size(0, AppInspectorMetrics.input)) - : style.minimumSize, - padding: desktop - ? const WidgetStatePropertyAll( - EdgeInsets.symmetric(horizontal: 8, vertical: 4), - ) - : style.padding, ); final panelColors = colors.copyWith(surface: colors.surfaceContainerLow); final composerBackground = theme @@ -415,19 +398,13 @@ abstract final class AppTheme { borderSide: BorderSide.none, ); return theme.copyWith( - extensions: [ - ...theme.extensions.values, - if (desktop) const InspectorControlDensity(), - ], canvasColor: colors.surfaceContainerLow, colorScheme: panelColors, textTheme: panelText, primaryTextTheme: panelText, inputDecorationTheme: theme.inputDecorationTheme.copyWith( - constraints: BoxConstraints( - minHeight: desktop - ? AppInspectorMetrics.input - : AppControlSize.propertyControl, + constraints: const BoxConstraints( + minHeight: AppControlSize.propertyControl, ), contentPadding: EdgeInsets.symmetric( horizontal: AppSpacing.controlHorizontal, @@ -468,14 +445,151 @@ abstract final class AppTheme { ); } + static ThemeData _desktopPropertiesPanelTheme(ThemeData theme) { + // UI3 – Figma's UI Kit, Templates / design.sidebar.right. + // The workspace owns the panel background and accents. + final dark = theme.brightness == Brightness.dark; + final background = theme.colorScheme.surfaceContainerLow; + final inputBackground = dark + ? const Color(0xFF383838) + : const Color(0xFFF5F5F5); + final ink = dark ? Colors.white : Colors.black.withValues(alpha: .9); + final secondaryInk = dark + ? Colors.white.withValues(alpha: .7) + : Colors.black.withValues(alpha: .5); + final divider = dark ? const Color(0xFF444444) : const Color(0xFFE6E6E6); + final colors = theme.colorScheme.copyWith( + surface: background, + surfaceContainer: inputBackground, + surfaceContainerHighest: inputBackground, + onSurface: ink, + onSurfaceVariant: secondaryInk, + outlineVariant: divider, + ); + final body = theme.textTheme.bodyMedium!.copyWith( + fontFamily: 'packages/cutdex_ui/Inter', + fontSize: AppInspectorMetrics.fontSize, + height: AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize, + fontWeight: FontWeight.w400, + fontVariations: const [FontVariation('wght', 450)], + letterSpacing: AppInspectorMetrics.fontSize * .005, + color: ink, + leadingDistribution: TextLeadingDistribution.even, + ); + final strong = body.copyWith( + fontWeight: FontWeight.w600, + fontVariations: const [FontVariation('wght', 550)], + ); + final text = theme.textTheme.copyWith( + bodyLarge: body, + bodyMedium: body, + bodySmall: body.copyWith(color: secondaryInk), + labelLarge: body, + labelMedium: body, + labelSmall: body.copyWith(color: secondaryInk), + titleSmall: strong.copyWith( + fontSize: 13, + height: 22 / 13, + letterSpacing: -.0325, + ), + ); + const shape = RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + ); + const inputShape = OutlineInputBorder( + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), + borderSide: BorderSide.none, + ); + ButtonStyle? button(ButtonStyle? style) => style?.copyWith( + textStyle: WidgetStatePropertyAll(body), + minimumSize: const WidgetStatePropertyAll( + Size(0, AppInspectorMetrics.input), + ), + padding: const WidgetStatePropertyAll( + EdgeInsets.symmetric(horizontal: 8), + ), + shape: const WidgetStatePropertyAll(shape), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + visualDensity: VisualDensity.standard, + ); + return theme.copyWith( + extensions: [...theme.extensions.values, const InspectorControlDensity()], + canvasColor: background, + colorScheme: colors, + textTheme: text, + primaryTextTheme: text, + dividerColor: divider, + dividerTheme: theme.dividerTheme.copyWith( + color: divider, + thickness: 1, + space: 1, + ), + iconTheme: theme.iconTheme.copyWith(color: secondaryInk, size: 16), + inputDecorationTheme: theme.inputDecorationTheme.copyWith( + constraints: const BoxConstraints(minHeight: AppInspectorMetrics.input), + contentPadding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + fillColor: inputBackground, + hintStyle: body.copyWith(color: secondaryInk), + border: inputShape, + enabledBorder: inputShape, + disabledBorder: inputShape, + focusedBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.primary), + ), + errorBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.error), + ), + focusedErrorBorder: inputShape.copyWith( + borderSide: BorderSide(color: colors.error), + ), + ), + iconButtonTheme: IconButtonThemeData( + style: theme.iconButtonTheme.style?.copyWith( + minimumSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + maximumSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + fixedSize: const WidgetStatePropertyAll( + Size.square(AppInspectorMetrics.action), + ), + shape: const WidgetStatePropertyAll(shape), + foregroundColor: WidgetStateProperty.resolveWith( + (states) => states.contains(WidgetState.disabled) + ? secondaryInk.withValues(alpha: .38) + : states.contains(WidgetState.selected) + ? colors.primary + : secondaryInk, + ), + ), + ), + textButtonTheme: TextButtonThemeData( + style: button(theme.textButtonTheme.style), + ), + filledButtonTheme: FilledButtonThemeData( + style: button(theme.filledButtonTheme.style), + ), + outlinedButtonTheme: OutlinedButtonThemeData( + style: button(theme.outlinedButtonTheme.style), + ), + ); + } + static bool isCompactInspector(BuildContext context) => Theme.of(context).extension() != null; static EdgeInsets propertySectionPadding(BuildContext context) => isDesktop(context) - ? const EdgeInsets.symmetric( - horizontal: AppInspectorMetrics.padding, - vertical: AppInspectorMetrics.groupGap / 2, + ? const EdgeInsets.fromLTRB( + AppInspectorMetrics.padding, + 0, + AppInspectorMetrics.trailingPadding, + AppInspectorMetrics.groupGap, ) : AppSpacing.panelSection; @@ -489,8 +603,12 @@ abstract final class AppTheme { static TextStyle propertyLabelStyle(BuildContext context) { final theme = Theme.of(context); return theme.textTheme.bodyMedium!.copyWith( - fontSize: isCompactInspector(context) ? 12 : null, - height: isCompactInspector(context) ? 16 / 12 : null, + fontSize: isCompactInspector(context) + ? AppInspectorMetrics.fontSize + : null, + height: isCompactInspector(context) + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : null, leadingDistribution: TextLeadingDistribution.even, color: theme.colorScheme.onSurfaceVariant, ); @@ -500,10 +618,12 @@ abstract final class AppTheme { Theme.of(context).textTheme.bodyMedium! .copyWith(fontSize: 13, height: 18 / 13); - /// Codex desktop's compact heading-sm: 13px, 1.4 line height, medium ink. + /// Inspector group titles share the UI3 input scale. static TextStyle propertySectionTitleStyle(BuildContext context) => Theme.of(context).textTheme.labelLarge!.copyWith( - height: 1.4, + height: isCompactInspector(context) + ? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize + : 1.4, color: Theme.of(context).colorScheme.onSurface, ); @@ -734,30 +854,44 @@ abstract final class AppTheme { }) { final colors = Theme.of(context).colorScheme; final ink = colors.onSurface; + final compact = isCompactInspector(context); + final height = compact + ? AppInspectorMetrics.input + : AppControlSize.headerButton; return ButtonStyle( - minimumSize: const WidgetStatePropertyAll( - Size(0, AppControlSize.headerButton), - ), - maximumSize: const WidgetStatePropertyAll( - Size(double.infinity, AppControlSize.headerButton), - ), + minimumSize: WidgetStatePropertyAll(Size(0, height)), + maximumSize: WidgetStatePropertyAll(Size(double.infinity, height)), tapTargetSize: MaterialTapTargetSize.shrinkWrap, - textStyle: WidgetStatePropertyAll(toolbarTextStyle(context)), + textStyle: WidgetStatePropertyAll( + compact + ? inputTextStyle(context).copyWith( + fontVariations: [FontVariation('wght', selected ? 550 : 450)], + ) + : toolbarTextStyle(context), + ), padding: const WidgetStatePropertyAll( EdgeInsets.symmetric(horizontal: AppSpacing.small), ), shape: WidgetStatePropertyAll( - RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : 8, + ), + ), ), foregroundColor: WidgetStatePropertyAll( selected ? ink + : compact + ? colors.onSurfaceVariant : Theme.of(context).brightness == Brightness.dark ? ink.withValues(alpha: .498) : colors.onSurfaceVariant, ), backgroundColor: WidgetStatePropertyAll( - selected ? ink.withValues(alpha: .05) : Colors.transparent, + selected + ? (compact ? colors.surfaceContainer : ink.withValues(alpha: .05)) + : Colors.transparent, ), overlayColor: WidgetStateProperty.resolveWith((states) { if (states.contains(WidgetState.hovered) || @@ -1746,16 +1880,16 @@ abstract final class AppDesktopMetrics { static const windowHeader = 44.0; static const panelHeader = 36.0; static const timelineTabs = 32.0; - static const timelineTabControl = 26.0; - static const timelineTabRadius = 7.0; - static const timelineToolbar = 36.0; + static const timelineTabControl = AppInspectorMetrics.input; + static const timelineTabRadius = AppInspectorMetrics.radius; + static const timelineToolbar = AppInspectorMetrics.row; static const timelineRuler = 28.0; - static const playbackBar = 36.0; + static const playbackBar = AppInspectorMetrics.row; static const iconButton = 28.0; static const button = 32.0; static const input = 36.0; static const sidebarRow = 32.0; - static const panelPadding = 12.0; + static const panelPadding = AppInspectorMetrics.padding; } /// Window project tabs have their own geometry, separate from timeline tabs. @@ -1770,11 +1904,18 @@ abstract final class AppProjectTabMetrics { /// Geometry for desktop parameter editing, independent of general inputs. abstract final class AppInspectorMetrics { - static const input = 28.0; + static const input = 24.0; static const action = 24.0; - static const rowGap = 4.0; + static const row = 32.0; + static const sectionHeader = 40.0; + static const rowPadding = 4.0; + static const rowGap = 8.0; static const groupGap = 12.0; - static const padding = 12.0; + static const padding = 16.0; + static const trailingPadding = 8.0; + static const radius = 5.0; + static const fontSize = 11.0; + static const lineHeight = 16.0; } class InspectorControlDensity extends ThemeExtension { diff --git a/packages/cutdex_ui/lib/src/widgets/app_combobox.dart b/packages/cutdex_ui/lib/src/widgets/app_combobox.dart index 5441471..4836780 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_combobox.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_combobox.dart @@ -124,6 +124,7 @@ class _AppComboboxState extends State> { builder: (context, constraints) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final inputStyle = AppTheme.inputTextStyle( context, style: AppTheme.isDesktop(context) @@ -181,21 +182,27 @@ class _AppComboboxState extends State> { AppDesktopMetrics.input : AppControlSize.input, ), - padding: const EdgeInsetsDirectional.only( - start: AppSpacing.compact, - end: AppSpacing.tiny, + padding: EdgeInsetsDirectional.only( + start: compact ? AppSpacing.small : AppSpacing.compact, + end: compact ? 0 : AppSpacing.tiny, ), decoration: BoxDecoration( color: AppTheme.comboboxBackground(context), - borderRadius: BorderRadius.circular(AppRadius.large), - border: Border.all(color: colors.outlineVariant), - boxShadow: [ - BoxShadow( - color: colors.shadow.withValues(alpha: .05), - offset: const Offset(0, 1), - blurRadius: 2, - ), - ], + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), + border: compact + ? null + : Border.all(color: colors.outlineVariant), + boxShadow: compact + ? [] + : [ + BoxShadow( + color: colors.shadow.withValues(alpha: .05), + offset: const Offset(0, 1), + blurRadius: 2, + ), + ], ), child: Row( children: [ @@ -257,9 +264,9 @@ class _AppComboboxState extends State> { icon: Icon( AppIcons.expandMore, size: 16, - color: colors.onSurfaceVariant.withValues( - alpha: .5, - ), + color: compact + ? colors.onSurfaceVariant + : colors.onSurfaceVariant.withValues(alpha: .5), ), ), ], diff --git a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart index e720fdf..12767c6 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar.dart @@ -32,19 +32,24 @@ class AppCommandToolbar extends StatelessWidget { final List trailing; final Widget? status; + static const _buttonSize = AppInspectorMetrics.input; + static const _commandSlot = 32.0; + Widget _button(AppToolbarCommand command) => IconButton( key: command.key, tooltip: command.label, onPressed: command.onPressed, icon: Icon(command.icon, semanticLabel: command.semanticLabel, size: 16), style: IconButton.styleFrom( - fixedSize: const Size.square(AppDesktopMetrics.iconButton), - minimumSize: const Size.square(AppDesktopMetrics.iconButton), - maximumSize: const Size.square(AppDesktopMetrics.iconButton), + fixedSize: const Size.square(_buttonSize), + minimumSize: const Size.square(_buttonSize), + maximumSize: const Size.square(_buttonSize), padding: EdgeInsets.zero, tapTargetSize: MaterialTapTargetSize.shrinkWrap, shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(AppRadius.small)), + borderRadius: BorderRadius.all( + Radius.circular(AppInspectorMetrics.radius), + ), ), ), ); @@ -53,13 +58,15 @@ class AppCommandToolbar extends StatelessWidget { Widget build(BuildContext context) => LayoutBuilder( builder: (context, constraints) { final commands = groups.expand((group) => group).toList(); - final reserved = trailing.length * 32 + (status == null ? 0 : 24); + final reserved = + trailing.length * _commandSlot + (status == null ? 0 : 24); final groupSpace = (groups.length - 1).clamp(0, groups.length) * 16; final allFit = - constraints.maxWidth >= commands.length * 32 + groupSpace + reserved; + constraints.maxWidth >= + commands.length * _commandSlot + groupSpace + reserved; final visibleCount = allFit ? commands.length - : ((constraints.maxWidth - reserved - groupSpace - 36) / 32) + : ((constraints.maxWidth - reserved - groupSpace - 36) / _commandSlot) .floor() .clamp(0, commands.length); final hidden = commands.skip(visibleCount).toList(); @@ -75,7 +82,7 @@ class AppCommandToolbar extends StatelessWidget { for (final command in group) if (index++ < visibleCount) ...[ _button(command), - const SizedBox(width: 4), + const SizedBox(width: 8), ], ], if (hidden.isNotEmpty) diff --git a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart index 73a6f8f..93bd9e0 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_command_toolbar_previews.dart @@ -9,7 +9,7 @@ import 'app_command_toolbar.dart'; @Preview( name: 'Timeline commands — light', group: 'Desktop workspace', - size: Size(480, 36), + size: Size(480, 32), ) Widget desktopTimelineToolbarLightPreview() => _toolbarPreview(Brightness.light); @@ -17,12 +17,12 @@ Widget desktopTimelineToolbarLightPreview() => @Preview( name: 'Timeline commands — dark', group: 'Desktop workspace', - size: Size(480, 36), + size: Size(480, 32), ) @Preview( name: 'Narrow timeline commands', group: 'Desktop workspace', - size: Size(180, 36), + size: Size(180, 32), ) Widget desktopTimelineToolbarPreview() => _toolbarPreview(Brightness.dark); @@ -36,7 +36,7 @@ Widget _toolbarPreview(Brightness brightness) => MaterialApp( Widget desktopTimelineCommands() => Material( child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium), child: AppCommandToolbar( groups: [ [ diff --git a/packages/cutdex_ui/lib/src/widgets/app_menu.dart b/packages/cutdex_ui/lib/src/widgets/app_menu.dart index 1647ceb..b63938f 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_menu.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_menu.dart @@ -453,6 +453,7 @@ class AppSelect extends StatelessWidget { builder: (context, constraints) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final current = options .where((option) => option.value == value) .firstOrNull; @@ -484,8 +485,10 @@ class AppSelect extends StatelessWidget { child: AnimatedContainer( duration: const Duration(milliseconds: 100), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(AppRadius.large), - boxShadow: outlined + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), + boxShadow: outlined && !compact ? [ BoxShadow( color: colors.shadow.withValues(alpha: .05), @@ -526,7 +529,11 @@ class AppSelect extends StatelessWidget { ), tapTargetSize: MaterialTapTargetSize.shrinkWrap, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(AppRadius.large), + borderRadius: BorderRadius.circular( + compact + ? AppInspectorMetrics.radius + : AppRadius.large, + ), ), side: outlined ? theme @@ -536,8 +543,12 @@ class AppSelect extends StatelessWidget { BorderSide(color: colors.outlineVariant) : null, padding: EdgeInsets.symmetric( - horizontal: outlined ? 12 : AppSpacing.tiny, - vertical: outlined ? AppSpacing.inputVertical : 0, + horizontal: outlined + ? (compact ? 8 : 12) + : AppSpacing.tiny, + vertical: outlined && !compact + ? AppSpacing.inputVertical + : 0, ), ), child: Row( @@ -557,9 +568,9 @@ class AppSelect extends StatelessWidget { Icon( AppIcons.expandMore, size: 16, - color: colors.onSurfaceVariant.withValues( - alpha: .5, - ), + color: compact + ? colors.onSurfaceVariant + : colors.onSurfaceVariant.withValues(alpha: .5), ), ], ), diff --git a/packages/cutdex_ui/lib/src/widgets/app_property_group.dart b/packages/cutdex_ui/lib/src/widgets/app_property_group.dart index 54d39ad..ad4bc70 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_property_group.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_property_group.dart @@ -2,6 +2,36 @@ import 'package:flutter/material.dart'; import '../theme/app_theme.dart'; +/// Shared inspector gutters, section spacing, and a full-width divider. +class AppPropertySection extends StatelessWidget { + const AppPropertySection({ + super.key, + required this.child, + this.bottomSpacing, + }); + + final Widget child; + final double? bottomSpacing; + + @override + Widget build(BuildContext context) { + final content = Padding( + padding: AppTheme.propertySectionPadding(context) + .copyWith(bottom: bottomSpacing), + child: child, + ); + if (!AppTheme.isCompactInspector(context)) return content; + return DecoratedBox( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(color: Theme.of(context).dividerColor), + ), + ), + child: content, + ); + } +} + /// An inspector property title, its actions, and the controls below it. class AppPropertyGroup extends StatelessWidget { const AppPropertyGroup({ @@ -10,43 +40,109 @@ class AppPropertyGroup extends StatelessWidget { required this.child, this.labelWidget, this.actions = const [], + this.padChild = true, }); final String label; final Widget? labelWidget; final List actions; + + /// Set to false when the child contains [AppPropertyRow] widgets. + final bool padChild; final Widget child; @override - Widget build(BuildContext context) => Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - ConstrainedBox( - constraints: BoxConstraints( - minHeight: AppTheme.isDesktop(context) - ? AppInspectorMetrics.action - : AppControlSize.propertyControl, - ), - child: Row( - children: [ - Expanded( - child: - labelWidget ?? - Text( - label, - style: AppTheme.propertySectionTitleStyle(context), - ), - ), - for (final action in actions) ...[ - SizedBox(width: AppTheme.propertyRowGap(context)), - action, + Widget build(BuildContext context) { + final compact = AppTheme.isCompactInspector(context); + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ConstrainedBox( + constraints: BoxConstraints( + minHeight: compact + ? AppInspectorMetrics.sectionHeader + : AppControlSize.propertyControl, + ), + child: Row( + children: [ + Expanded( + child: + labelWidget ?? + Text( + label, + style: AppTheme.propertySectionTitleStyle(context), + ), + ), + for (final action in actions) ...[ + SizedBox( + width: compact + ? AppSpacing.tiny + : AppTheme.propertyRowGap(context), + ), + action, + ], ], - ], + ), ), + if (compact && padChild) + Padding( + padding: const EdgeInsets.symmetric( + vertical: AppInspectorMetrics.rowPadding, + ), + child: child, + ) + else if (compact) + child + else ...[ + SizedBox(height: AppTheme.propertyRowGap(context)), + child, + ], + ], + ); + } +} + +/// UI3 control cells share equal widths and a separate 24px action column. +class AppPropertyRow extends StatelessWidget { + const AppPropertyRow({ + super.key, + required this.children, + this.trailing, + this.reserveTrailing = true, + this.flexes, + }) : assert(children.length > 0), + assert(flexes == null || flexes.length == children.length); + + final List children; + final Widget? trailing; + final bool reserveTrailing; + final List? flexes; + + @override + Widget build(BuildContext context) => Padding( + padding: const EdgeInsets.symmetric( + vertical: AppInspectorMetrics.rowPadding, + ), + child: ConstrainedBox( + constraints: const BoxConstraints(minHeight: AppInspectorMetrics.input), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + for (var i = 0; i < children.length; i++) ...[ + if (i > 0) const SizedBox(width: AppInspectorMetrics.rowGap), + Expanded(flex: flexes?[i] ?? 1, child: children[i]), + ], + if (trailing != null || reserveTrailing) ...[ + const SizedBox(width: AppInspectorMetrics.rowGap), + SizedBox( + width: AppInspectorMetrics.action, + child: + trailing ?? const SizedBox(height: AppInspectorMetrics.input), + ), + ], + ], ), - SizedBox(height: AppTheme.propertyRowGap(context)), - child, - ], + ), ); } diff --git a/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart b/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart index 7c2bd66..835cce7 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_property_group_previews.dart @@ -6,23 +6,24 @@ import '../theme/app_palette.dart'; import '../theme/app_theme.dart'; import 'app_property_group.dart'; import 'app_text_field.dart'; +import 'app_button_group.dart'; @Preview( name: 'Property groups — light', group: 'Desktop inspector', - size: Size(280, 240), + size: Size(240, 360), ) Widget propertyGroupsLightPreview() => _preview(Brightness.light); @Preview( name: 'Property groups — dark', group: 'Desktop inspector', - size: Size(280, 240), + size: Size(240, 360), ) @Preview( name: 'Narrow property groups', group: 'Desktop inspector', - size: Size(220, 240), + size: Size(220, 360), ) Widget propertyGroupsDarkPreview() => _preview(Brightness.dark); @@ -49,6 +50,7 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { TextEditingController(text: '100'), TextEditingController(text: '100'), TextEditingController(text: '0'), + TextEditingController(text: '0'), ]; bool _locked = true; final _keyed = {}; @@ -70,19 +72,17 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { }), ); - Widget _pair(String a, String b, int index, {String? unit}) => Row( + Widget _pair( + String a, + String b, + int index, { + String? unit, + Widget? trailing, + }) => AppPropertyRow( + trailing: trailing, children: [ - Expanded( - child: AppTextField(label: a, unit: unit, controller: _values[index]), - ), - const SizedBox(width: 4), - Expanded( - child: AppTextField( - label: b, - unit: unit, - controller: _values[index + 1], - ), - ), + AppTextField(label: a, unit: unit, controller: _values[index]), + AppTextField(label: b, unit: unit, controller: _values[index + 1]), ], ); @@ -93,41 +93,100 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> { for (final group in [ AppPropertyGroup( label: '位置', - actions: [_keyframe(0)], - child: _pair('X', 'Y', 0), + padChild: false, + child: Column( + children: [ + AppPropertyRow( + children: [ + for (final (index, icons) in [ + ( + 0, + [ + AppIcons.alignLeft, + AppIcons.alignHorizontalCenter, + AppIcons.alignRight, + ], + ), + ( + 1, + [ + AppIcons.alignTop, + AppIcons.alignVerticalCenter, + AppIcons.alignBottom, + ], + ), + ]) + AppButtonGroup( + expanded: true, + label: 'Alignment', + children: [ + for (var i = 0; i < icons.length; i++) + IconButton( + icon: Icon(icons[i]), + onPressed: () => + _values[index].text = '${i * 100}', + ), + ], + ), + ], + ), + _pair('X', 'Y', 0, trailing: _keyframe(0)), + AppPropertyRow( + trailing: _keyframe(2), + children: [ + AppTextField( + label: '旋转', + leading: const SizedBox( + width: AppInspectorMetrics.action, + child: Center(child: Icon(AppIcons.angle, size: 14)), + ), + unit: '°', + controller: _values[4], + ), + const SizedBox.shrink(), + ], + ), + ], + ), ), AppPropertyGroup( label: '缩放', - actions: [ - IconButton( + actions: [_keyframe(1)], + padChild: false, + child: _pair( + 'W', + 'H', + 2, + unit: '%', + trailing: IconButton( tooltip: 'Lock aspect ratio', isSelected: _locked, icon: const Icon(AppIcons.unlock), selectedIcon: const Icon(AppIcons.lockFilled), onPressed: () => setState(() => _locked = !_locked), ), - _keyframe(1), - ], - child: _pair('W', 'H', 2, unit: '%'), + ), ), AppPropertyGroup( - label: '旋转', - actions: [_keyframe(2)], - child: AppTextField( - label: '旋转', - leading: const Padding( - padding: EdgeInsets.symmetric(horizontal: 8), - child: Icon(AppIcons.angle, size: 14), - ), - unit: '°', - controller: _values[4], + label: '圆角', + padChild: false, + child: AppPropertyRow( + trailing: _keyframe(3), + children: [ + AppTextField( + label: '圆角', + leading: const SizedBox( + width: AppInspectorMetrics.action, + child: Center(child: Icon(AppIcons.cornerRadius, size: 14)), + ), + controller: _values[5], + ), + const SizedBox.shrink(), + ], ), ), ]) - Padding( - padding: AppTheme.propertySectionPadding(context), - child: group, - ), + AppPropertySection(child: group), ], ), ); diff --git a/packages/cutdex_ui/lib/src/widgets/app_switch.dart b/packages/cutdex_ui/lib/src/widgets/app_switch.dart index f84f67b..8ac1174 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_switch.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_switch.dart @@ -40,7 +40,9 @@ class _AppSwitchState extends State { onFocusChange: (value) => setState(() => _focused = value), child: SizedBox( width: width, - height: 36, + height: AppTheme.isCompactInspector(context) + ? AppInspectorMetrics.input + : 36, child: Stack( alignment: Alignment.center, children: [ diff --git a/packages/cutdex_ui/lib/src/widgets/app_text_field.dart b/packages/cutdex_ui/lib/src/widgets/app_text_field.dart index eda4604..f237372 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_text_field.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_text_field.dart @@ -65,6 +65,7 @@ class _AppTextFieldState extends State { Widget build(BuildContext context) { final theme = Theme.of(context); final colors = theme.colorScheme; + final compact = AppTheme.isCompactInspector(context); final foreground = widget.enabled ? colors.onSurface : colors.onSurface.withValues(alpha: 0.38); @@ -72,9 +73,11 @@ class _AppTextFieldState extends State { final borderless = theme.inputDecorationTheme.enabledBorder?.borderSide == BorderSide.none; final style = AppTheme.inputTextStyle(context) - .copyWith(color: foreground, letterSpacing: 0); + .copyWith(color: foreground, letterSpacing: compact ? null : 0); OutlineInputBorder border(Color color) => OutlineInputBorder( - borderRadius: BorderRadius.circular(AppRadius.large), + borderRadius: BorderRadius.circular( + compact ? AppInspectorMetrics.radius : AppRadius.large, + ), borderSide: BorderSide(color: color), ); @@ -107,12 +110,20 @@ class _AppTextFieldState extends State { hintStyle: AppTheme.inputHintStyle(context, style: style), errorText: widget.errorText, errorMaxLines: 2, - contentPadding: - theme.inputDecorationTheme.contentPadding ?? - const EdgeInsets.symmetric( - horizontal: AppSpacing.controlHorizontal, - vertical: AppSpacing.inputVertical, - ), + contentPadding: compact && widget.maxLines == 1 + ? EdgeInsets.fromLTRB( + !labelAbove && (widget.leading != null || widget.label != null) + ? 0 + : 8, + 4, + widget.unit == null ? 8 : 0, + 4, + ) + : theme.inputDecorationTheme.contentPadding ?? + const EdgeInsets.symmetric( + horizontal: AppSpacing.controlHorizontal, + vertical: AppSpacing.inputVertical, + ), prefixIcon: labelAbove ? null : widget.leading ?? @@ -122,18 +133,26 @@ class _AppTextFieldState extends State { widthFactor: 1, heightFactor: 1, child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: AppSpacing.small, + padding: EdgeInsets.symmetric( + horizontal: compact && widget.label!.length == 1 + ? 0 + : AppSpacing.small, ), child: ExcludeSemantics( - child: Text( - widget.label!, - style: AppTheme.propertyLabelStyle(context) - .copyWith( - color: widget.enabled - ? colors.onSurfaceVariant - : foreground, - ), + child: SizedBox( + width: compact && widget.label!.length == 1 + ? AppInspectorMetrics.action + : null, + child: Text( + widget.label!, + textAlign: TextAlign.center, + style: AppTheme.propertyLabelStyle(context) + .copyWith( + color: widget.enabled + ? colors.onSurfaceVariant + : foreground, + ), + ), ), ), ), @@ -148,8 +167,8 @@ class _AppTextFieldState extends State { widthFactor: 1, heightFactor: 1, child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: AppSpacing.small, + padding: EdgeInsets.symmetric( + horizontal: compact ? 4 : AppSpacing.small, ), child: ExcludeSemantics( child: Text( @@ -163,8 +182,8 @@ class _AppTextFieldState extends State { ), ), ), - suffixIconConstraints: const BoxConstraints( - minWidth: AppControlSize.compact, + suffixIconConstraints: BoxConstraints( + minWidth: compact ? 16 : AppControlSize.compact, minHeight: AppControlSize.input, ), border: theme.inputDecorationTheme.border, @@ -201,12 +220,44 @@ class _AppTextFieldState extends State { child: Semantics( label: [widget.label, widget.unit].whereType().join(' '), child: labelAbove - ? AppPropertyGroup( - label: widget.label ?? '', - labelWidget: widget.leading, - actions: widget.labelActions, - child: input, - ) + ? compact + ? Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ConstrainedBox( + constraints: const BoxConstraints( + minHeight: AppInspectorMetrics.lineHeight, + ), + child: Row( + children: [ + Expanded( + child: + widget.leading ?? + Text( + widget.label ?? '', + style: AppTheme.propertyLabelStyle( + context, + ), + ), + ), + for (final action in widget.labelActions) ...[ + const SizedBox(width: AppSpacing.tiny), + action, + ], + ], + ), + ), + const SizedBox(height: AppInspectorMetrics.rowPadding), + input, + ], + ) + : AppPropertyGroup( + label: widget.label ?? '', + labelWidget: widget.leading, + actions: widget.labelActions, + child: input, + ) : input, ), ); diff --git a/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart b/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart index 42c0924..2c8f25e 100644 --- a/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart +++ b/packages/cutdex_ui/lib/src/widgets/app_toolbar_dropdown_button.dart @@ -24,8 +24,8 @@ class AppToolbarDropdownButton extends StatelessWidget { key: buttonKey, focusNode: focusNode, onPressed: onPressed, - style: AppTheme.toolbarButtonStyle(context) - .merge(style) + style: (style ?? const ButtonStyle()) + .merge(AppTheme.toolbarButtonStyle(context)) .copyWith( backgroundColor: const WidgetStatePropertyAll(Colors.transparent), overlayColor: WidgetStateProperty.resolveWith((states) { diff --git a/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart b/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart index ea1a573..a0ffb4b 100644 --- a/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart +++ b/packages/cutdex_ui/lib/src/widgets/compact_panel_tabs.dart @@ -24,14 +24,19 @@ class CompactPanelTabs extends StatelessWidget { @override Widget build(BuildContext context) => SizedBox( - height: AppTheme.isDesktop(context) + height: AppTheme.isCompactInspector(context) + ? AppInspectorMetrics.sectionHeader + : AppTheme.isDesktop(context) ? AppDesktopMetrics.panelHeader : height, child: Padding( padding: AppTheme.isDesktop(context) && padding == const EdgeInsets.all(AppSpacing.gap) - ? const EdgeInsets.symmetric(horizontal: 8, vertical: 4) + ? EdgeInsets.symmetric( + horizontal: 8, + vertical: AppTheme.isCompactInspector(context) ? 8 : 4, + ) : padding, child: SingleChildScrollView( scrollDirection: Axis.horizontal, diff --git a/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart b/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart index be31e6f..8bef4ce 100644 --- a/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart +++ b/packages/cutdex_ui/lib/src/widgets/timeline_controls_previews.dart @@ -53,7 +53,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> { child: SizedBox( height: AppDesktopMetrics.timelineTabs, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), child: Row( children: [ Expanded( @@ -117,7 +117,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> { SizedBox( height: AppDesktopMetrics.timelineToolbar, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), + padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium), child: AppCommandToolbar( groups: [ [ diff --git a/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart b/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart index 2fa1185..01f2f67 100644 --- a/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart +++ b/packages/cutdex_ui/lib/src/widgets/workspace_panel.dart @@ -53,7 +53,9 @@ class WorkspacePanel extends StatelessWidget { title, maxLines: 1, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.labelLarge, + style: AppTheme.isCompactInspector(context) + ? Theme.of(context).textTheme.titleSmall + : Theme.of(context).textTheme.labelLarge, ), ), if (controls case final controls?) ...[ diff --git a/packages/cutdex_ui/pubspec.yaml b/packages/cutdex_ui/pubspec.yaml index 1618ff1..345efba 100644 --- a/packages/cutdex_ui/pubspec.yaml +++ b/packages/cutdex_ui/pubspec.yaml @@ -18,6 +18,9 @@ dev_dependencies: freezed: ^4.0.2 flutter: fonts: + - family: Inter + fonts: + - asset: assets/fonts/InterVariable.ttf - family: PhosphorRegular fonts: - asset: assets/fonts/PhosphorRegular.ttf @@ -25,4 +28,5 @@ flutter: fonts: - asset: assets/fonts/PhosphorFill.ttf assets: + - assets/fonts/INTER_LICENSE.txt - assets/fonts/PHOSPHOR_LICENSE.txt diff --git a/packages/cutdex_ui/test/app_property_group_test.dart b/packages/cutdex_ui/test/app_property_group_test.dart index af0f816..2ca2adc 100644 --- a/packages/cutdex_ui/test/app_property_group_test.dart +++ b/packages/cutdex_ui/test/app_property_group_test.dart @@ -19,8 +19,7 @@ void main() { home: Scaffold( body: SizedBox( width: 220, - child: Padding( - padding: const EdgeInsets.all(12), + child: AppPropertySection( child: AppPropertyGroup( label: 'Position', actions: [ @@ -38,7 +37,7 @@ void main() { errorText: 'Invalid value', ), ), - SizedBox(width: 4), + SizedBox(width: AppInspectorMetrics.rowGap), Expanded(child: AppTextField(label: 'Y')), ], ), @@ -51,8 +50,8 @@ void main() { await tester.pumpAndSettle(); final first = find.byType(TextField).first; final second = find.byType(TextField).last; - expect(tester.getRect(first).width, 96); - expect(tester.getRect(second).right, 208); + expect(tester.getRect(first).width, 94); + expect(tester.getRect(second).right, 212); expect(tester.getRect(first).top, tester.getRect(second).top); expect( tester.getRect(first).height, @@ -60,7 +59,7 @@ void main() { ); expect( tester.getRect(find.byType(IconButton)).bottom, - tester.getRect(first).top - 4, + tester.getRect(first).top - 12, ); expect( tester.widget(first).decoration!.prefixIcon, diff --git a/packages/cutdex_ui/test/app_theme_test.dart b/packages/cutdex_ui/test/app_theme_test.dart index 792ddcd..0c5a1fe 100644 --- a/packages/cutdex_ui/test/app_theme_test.dart +++ b/packages/cutdex_ui/test/app_theme_test.dart @@ -7,12 +7,79 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { + test( + 'desktop inspector keeps panel colors with UI3 typography and inputs', + () { + for (final palette in AppPalette.values) { + for (final brightness in Brightness.values) { + final base = AppTheme.desktopWorkspaceTheme( + AppTheme.forPalette(palette, brightness), + ); + final theme = AppTheme.propertiesPanelTheme(base); + final dark = brightness == Brightness.dark; + expect( + theme.colorScheme.surface, + base.colorScheme.surfaceContainerLow, + ); + expect(theme.canvasColor, base.colorScheme.surfaceContainerLow); + expect( + theme.colorScheme.surfaceContainerLow, + base.colorScheme.surfaceContainerLow, + ); + expect(theme.scaffoldBackgroundColor, base.scaffoldBackgroundColor); + expect( + theme.inputDecorationTheme.fillColor, + dark ? const Color(0xFF383838) : const Color(0xFFF5F5F5), + ); + expect( + theme.colorScheme.onSurface, + dark ? Colors.white : Colors.black.withValues(alpha: .9), + ); + expect( + theme.colorScheme.onSurfaceVariant, + dark + ? Colors.white.withValues(alpha: .7) + : Colors.black.withValues(alpha: .5), + ); + expect( + theme.dividerColor, + dark ? const Color(0xFF444444) : const Color(0xFFE6E6E6), + ); + expect(theme.colorScheme.primary, base.colorScheme.primary); + final text = theme.textTheme.bodyMedium!; + expect(text.fontFamily, 'packages/cutdex_ui/Inter'); + expect( + text.fontFamilyFallback, + base.textTheme.bodyMedium!.fontFamilyFallback, + ); + expect(text.fontSize, 11); + expect(text.height! * text.fontSize!, closeTo(16, .001)); + expect(text.fontVariations, const [ui.FontVariation('wght', 450)]); + expect(text.letterSpacing, closeTo(.055, .001)); + expect( + (theme.inputDecorationTheme.enabledBorder! as OutlineInputBorder) + .borderRadius, + BorderRadius.circular(5), + ); + expect( + theme.inputDecorationTheme.enabledBorder!.borderSide, + BorderSide.none, + ); + expect( + theme.inputDecorationTheme.focusedBorder!.borderSide.color, + base.colorScheme.primary, + ); + } + } + }, + ); + testWidgets('slider density follows inspector and desktop contexts', ( tester, ) async { final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); for (final (theme, height) in [ - (AppTheme.propertiesPanelTheme(desktop), 28.0), + (AppTheme.propertiesPanelTheme(desktop), 24.0), (desktop, 36.0), ( AppTheme.propertiesPanelTheme(AppTheme.penDark), @@ -44,9 +111,9 @@ void main() { final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); final inspector = AppTheme.propertiesPanelTheme(desktop); expect(desktop.inputDecorationTheme.constraints!.minHeight, 36); - expect(inspector.inputDecorationTheme.constraints!.minHeight, 28); - expect(inspector.textTheme.bodyMedium!.fontSize, 13); - expect(inspector.textTheme.bodySmall!.fontSize, 12); + expect(inspector.inputDecorationTheme.constraints!.minHeight, 24); + expect(inspector.textTheme.bodyMedium!.fontSize, 11); + expect(inspector.textTheme.bodySmall!.fontSize, 11); expect( inspector.iconButtonTheme.style!.fixedSize!.resolve({}), const Size.square(24),