feat(ui): align desktop controls and inspector typography with Figma UI3

This commit is contained in:
lingjhf committed 2026-10-09 19:20:54 +08:00
1 parent abc1868550
commit bc3fdd6119
45 files changed
+1747 -168

No files matched your search

+2
View File
@@ -7,3 +7,5 @@ Flutter/Dart 依赖及解析版本记录在 `pubspec.yaml`、内部包的 `pubsp
应用发行包捆绑的媒体处理库、推理工具和模型遵循各自的许可与再分发要求。打包时保留随附的许可证和通知文件;不能用本仓库的 MIT 许可替代。 应用发行包捆绑的媒体处理库、推理工具和模型遵循各自的许可与再分发要求。打包时保留随附的许可证和通知文件;不能用本仓库的 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` 中。
+7 -5
View File
@@ -411,7 +411,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> {
controller: _scrollController, controller: _scrollController,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small),
child: Row( child: Row(
children: [ children: [
for ( for (
@@ -419,7 +419,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> {
index < widget.timelines.length; index < widget.timelines.length;
index++ index++
) ...[ ) ...[
if (index > 0) const SizedBox(width: AppSpacing.hairline), if (index > 0) const SizedBox(width: AppSpacing.tiny),
_buildTab(context, widget.timelines[index]), _buildTab(context, widget.timelines[index]),
], ],
], ],
@@ -497,7 +497,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> {
), ),
Padding( Padding(
padding: EdgeInsetsDirectional.only( padding: EdgeInsetsDirectional.only(
end: desktop ? AppSpacing.tiny : 0, end: desktop ? AppSpacing.small : 0,
), ),
child: listButton, child: listButton,
), ),
@@ -538,7 +538,7 @@ class _TimelineTabsBarState extends ConsumerState<_TimelineTabsBar> {
), ),
], ],
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 3), padding: const EdgeInsets.symmetric(vertical: 4),
child: Semantics( child: Semantics(
selected: selected, selected: selected,
child: ConstrainedBox( child: ConstrainedBox(
@@ -934,7 +934,9 @@ class _TimelineEditorState extends State<_TimelineEditor> {
? AppDesktopMetrics.timelineToolbar ? AppDesktopMetrics.timelineToolbar
: 32, : 32,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8), padding: const EdgeInsets.symmetric(
horizontal: AppSpacing.medium,
),
child: AppCommandToolbar( child: AppCommandToolbar(
groups: [ groups: [
[ [
@@ -148,12 +148,9 @@ class TimelineSpeedEditor extends StatelessWidget {
} }
for (var index = 0; index < frame.length; index++) { for (var index = 0; index < frame.length; index++) {
if (frame.kindAt(index) == TimelineViewportItemKind.transition) { final handle = controller.elementForFrameItem(frame, index);
continue;
}
final identity = frame.identityAt(index);
final handle = controller.elementForIdentity(identity);
if (handle == null) continue; if (handle == null) continue;
final identity = frame.identityAt(index);
final bodyId = identity is LayoutBodyId final bodyId = identity is LayoutBodyId
? identity ? identity
: LayoutBodyId.element(handle); : LayoutBodyId.element(handle);
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Name: Z bis A", "mediaSortNameDescending": "Name: Z bis A",
"mediaSelectedCount": "{count} ausgewählt", "mediaSelectedCount": "{count} ausgewählt",
"navigationHome": "Startseite", "navigationHome": "Startseite",
"workflow": "Arbeitsablauf",
"workflowDescription": "Organisiere und verwalte hier deine Bearbeitungsabläufe.",
"mediaThumbnailSize": "Vorschaubildgröße", "mediaThumbnailSize": "Vorschaubildgröße",
"mediaThumbnailSmall": "Kleine Vorschaubilder", "mediaThumbnailSmall": "Kleine Vorschaubilder",
"mediaThumbnailMedium": "Mittlere Vorschaubilder", "mediaThumbnailMedium": "Mittlere Vorschaubilder",
@@ -931,5 +933,27 @@
"type": "String" "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"
} }
+24
View File
@@ -1373,6 +1373,8 @@
} }
}, },
"navigationHome": "Home", "navigationHome": "Home",
"workflow": "Workflow",
"workflowDescription": "Organize and manage your editing workflows here.",
"mediaThumbnailSize": "Thumbnail size", "mediaThumbnailSize": "Thumbnail size",
"mediaThumbnailSmall": "Small thumbnails", "mediaThumbnailSmall": "Small thumbnails",
"mediaThumbnailMedium": "Medium thumbnails", "mediaThumbnailMedium": "Medium thumbnails",
@@ -1391,5 +1393,27 @@
"type": "String" "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"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Nombre: Z a A", "mediaSortNameDescending": "Nombre: Z a A",
"mediaSelectedCount": "{count} seleccionados", "mediaSelectedCount": "{count} seleccionados",
"navigationHome": "Inicio", "navigationHome": "Inicio",
"workflow": "Flujo de trabajo",
"workflowDescription": "Organiza y gestiona aquí tus flujos de trabajo de edición.",
"mediaThumbnailSize": "Tamaño de miniatura", "mediaThumbnailSize": "Tamaño de miniatura",
"mediaThumbnailSmall": "Miniaturas pequeñas", "mediaThumbnailSmall": "Miniaturas pequeñas",
"mediaThumbnailMedium": "Miniaturas medianas", "mediaThumbnailMedium": "Miniaturas medianas",
@@ -931,5 +933,27 @@
"type": "String" "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"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Nom : Z à A", "mediaSortNameDescending": "Nom : Z à A",
"mediaSelectedCount": "{count} sélectionnés", "mediaSelectedCount": "{count} sélectionnés",
"navigationHome": "Accueil", "navigationHome": "Accueil",
"workflow": "Flux de travail",
"workflowDescription": "Organisez et gérez vos flux de travail de montage ici.",
"mediaThumbnailSize": "Taille des vignettes", "mediaThumbnailSize": "Taille des vignettes",
"mediaThumbnailSmall": "Petites vignettes", "mediaThumbnailSmall": "Petites vignettes",
"mediaThumbnailMedium": "Vignettes moyennes", "mediaThumbnailMedium": "Vignettes moyennes",
@@ -931,5 +933,27 @@
"type": "String" "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"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Nome: Z–A", "mediaSortNameDescending": "Nome: Z–A",
"mediaSelectedCount": "{count} selezionati", "mediaSelectedCount": "{count} selezionati",
"navigationHome": "Home", "navigationHome": "Home",
"workflow": "Flusso di lavoro",
"workflowDescription": "Organizza e gestisci qui i tuoi flussi di lavoro di editing.",
"mediaThumbnailSize": "Dimensione miniature", "mediaThumbnailSize": "Dimensione miniature",
"mediaThumbnailSmall": "Miniature piccole", "mediaThumbnailSmall": "Miniature piccole",
"mediaThumbnailMedium": "Miniature medie", "mediaThumbnailMedium": "Miniature medie",
@@ -931,5 +933,27 @@
"type": "String" "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"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "名前の降順", "mediaSortNameDescending": "名前の降順",
"mediaSelectedCount": "{count} 個選択", "mediaSelectedCount": "{count} 個選択",
"navigationHome": "ホーム", "navigationHome": "ホーム",
"workflow": "ワークフロー",
"workflowDescription": "編集ワークフローをここで整理、管理できます。",
"mediaThumbnailSize": "サムネイルサイズ", "mediaThumbnailSize": "サムネイルサイズ",
"mediaThumbnailSmall": "小さいサムネイル", "mediaThumbnailSmall": "小さいサムネイル",
"mediaThumbnailMedium": "中サイズのサムネイル", "mediaThumbnailMedium": "中サイズのサムネイル",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "角の半径",
"shadow": "シャドウ",
"addShadow": "シャドウを追加",
"shadowLayer": "シャドウ {number}",
"shadowBlur": "ぼかし",
"shadowSpread": "広がり",
"shadowOpacity": "不透明度",
"moveShadowUp": "上へ移動",
"moveShadowDown": "下へ移動",
"updateShadowFailed": "シャドウを更新できません",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "角を個別に設定",
"cornerTopLeft": "左上の半径",
"cornerTopRight": "右上の半径",
"cornerBottomRight": "右下の半径",
"cornerBottomLeft": "左下の半径"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "이름 내림차순", "mediaSortNameDescending": "이름 내림차순",
"mediaSelectedCount": "{count}개 선택됨", "mediaSelectedCount": "{count}개 선택됨",
"navigationHome": "홈", "navigationHome": "홈",
"workflow": "워크플로",
"workflowDescription": "여기에서 편집 워크플로를 구성하고 관리하세요.",
"mediaThumbnailSize": "썸네일 크기", "mediaThumbnailSize": "썸네일 크기",
"mediaThumbnailSmall": "작은 썸네일", "mediaThumbnailSmall": "작은 썸네일",
"mediaThumbnailMedium": "중간 썸네일", "mediaThumbnailMedium": "중간 썸네일",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "모서리 반경",
"shadow": "그림자",
"addShadow": "그림자 추가",
"shadowLayer": "그림자 {number}",
"shadowBlur": "흐림",
"shadowSpread": "확산",
"shadowOpacity": "불투명도",
"moveShadowUp": "위로 이동",
"moveShadowDown": "아래로 이동",
"updateShadowFailed": "그림자를 업데이트할 수 없습니다",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "모서리 개별 설정",
"cornerTopLeft": "왼쪽 위 반경",
"cornerTopRight": "오른쪽 위 반경",
"cornerBottomRight": "오른쪽 아래 반경",
"cornerBottomLeft": "왼쪽 아래 반경"
} }
+102
View File
@@ -4250,6 +4250,18 @@ abstract class AppLocalizations {
/// **'Home'** /// **'Home'**
String get navigationHome; 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. /// No description provided for @mediaThumbnailSize.
/// ///
/// In en, this message translates to: /// In en, this message translates to:
@@ -4321,6 +4333,96 @@ abstract class AppLocalizations {
/// In en, this message translates to: /// In en, this message translates to:
/// **'Imported audio is in My media.'** /// **'Imported audio is in My media.'**
String get resourceImportedAudioHint; 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 class _AppLocalizationsDelegate
+54
View File
@@ -2312,6 +2312,13 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get navigationHome => 'Startseite'; String get navigationHome => 'Startseite';
@override
String get workflow => 'Arbeitsablauf';
@override
String get workflowDescription =>
'Organisiere und verwalte hier deine Bearbeitungsabläufe.';
@override @override
String get mediaThumbnailSize => 'Vorschaubildgröße'; String get mediaThumbnailSize => 'Vorschaubildgröße';
@@ -2350,4 +2357,51 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => String get resourceImportedAudioHint =>
'Importiertes Audio befindet sich in Meine Medien.'; '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';
} }
+54
View File
@@ -2277,6 +2277,13 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get navigationHome => 'Home'; String get navigationHome => 'Home';
@override
String get workflow => 'Workflow';
@override
String get workflowDescription =>
'Organize and manage your editing workflows here.';
@override @override
String get mediaThumbnailSize => 'Thumbnail size'; String get mediaThumbnailSize => 'Thumbnail size';
@@ -2314,4 +2321,51 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => 'Imported audio is in My media.'; 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';
} }
+54
View File
@@ -2311,6 +2311,13 @@ class AppLocalizationsEs extends AppLocalizations {
@override @override
String get navigationHome => 'Inicio'; 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 @override
String get mediaThumbnailSize => 'Tamaño de miniatura'; String get mediaThumbnailSize => 'Tamaño de miniatura';
@@ -2349,4 +2356,51 @@ class AppLocalizationsEs extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => String get resourceImportedAudioHint =>
'El audio importado está en Mis medios.'; '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';
} }
+54
View File
@@ -2314,6 +2314,13 @@ class AppLocalizationsFr extends AppLocalizations {
@override @override
String get navigationHome => 'Accueil'; 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 @override
String get mediaThumbnailSize => 'Taille des vignettes'; String get mediaThumbnailSize => 'Taille des vignettes';
@@ -2352,4 +2359,51 @@ class AppLocalizationsFr extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => String get resourceImportedAudioHint =>
'Les fichiers audio importés sont dans Mes médias.'; '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';
} }
+54
View File
@@ -2304,6 +2304,13 @@ class AppLocalizationsIt extends AppLocalizations {
@override @override
String get navigationHome => 'Home'; 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 @override
String get mediaThumbnailSize => 'Dimensione miniature'; String get mediaThumbnailSize => 'Dimensione miniature';
@@ -2342,4 +2349,51 @@ class AppLocalizationsIt extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => String get resourceImportedAudioHint =>
'L’audio importato si trova in I miei media.'; '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';
} }
+53
View File
@@ -2212,6 +2212,12 @@ class AppLocalizationsJa extends AppLocalizations {
@override @override
String get navigationHome => 'ホーム'; String get navigationHome => 'ホーム';
@override
String get workflow => 'ワークフロー';
@override
String get workflowDescription => '編集ワークフローをここで整理、管理できます。';
@override @override
String get mediaThumbnailSize => 'サムネイルサイズ'; String get mediaThumbnailSize => 'サムネイルサイズ';
@@ -2249,4 +2255,51 @@ class AppLocalizationsJa extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => '読み込んだ音声は「マイメディア」にあります。'; 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 => '左下の半径';
} }
+53
View File
@@ -2212,6 +2212,12 @@ class AppLocalizationsKo extends AppLocalizations {
@override @override
String get navigationHome => '홈'; String get navigationHome => '홈';
@override
String get workflow => '워크플로';
@override
String get workflowDescription => '여기에서 편집 워크플로를 구성하고 관리하세요.';
@override @override
String get mediaThumbnailSize => '썸네일 크기'; String get mediaThumbnailSize => '썸네일 크기';
@@ -2249,4 +2255,51 @@ class AppLocalizationsKo extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => '가져온 오디오는 내 미디어에 있습니다.'; 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 => '왼쪽 아래 반경';
} }
+54
View File
@@ -2304,6 +2304,13 @@ class AppLocalizationsPt extends AppLocalizations {
@override @override
String get navigationHome => 'Início'; 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 @override
String get mediaThumbnailSize => 'Tamanho das miniaturas'; String get mediaThumbnailSize => 'Tamanho das miniaturas';
@@ -2342,4 +2349,51 @@ class AppLocalizationsPt extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => String get resourceImportedAudioHint =>
'O áudio importado está em Minha mídia.'; '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';
} }
+54
View File
@@ -2297,6 +2297,13 @@ class AppLocalizationsRu extends AppLocalizations {
@override @override
String get navigationHome => 'Главная'; String get navigationHome => 'Главная';
@override
String get workflow => 'Рабочий процесс';
@override
String get workflowDescription =>
'Здесь можно организовывать рабочие процессы монтажа.';
@override @override
String get mediaThumbnailSize => 'Размер миниатюр'; String get mediaThumbnailSize => 'Размер миниатюр';
@@ -2335,4 +2342,51 @@ class AppLocalizationsRu extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => 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 => 'Радиус слева снизу';
} }
+159
View File
@@ -2169,6 +2169,12 @@ class AppLocalizationsZh extends AppLocalizations {
@override @override
String get navigationHome => '首页'; String get navigationHome => '首页';
@override
String get workflow => '工作流';
@override
String get workflowDescription => '在这里编排和管理剪辑工作流。';
@override @override
String get mediaThumbnailSize => '缩略图大小'; String get mediaThumbnailSize => '缩略图大小';
@@ -2206,6 +2212,53 @@ class AppLocalizationsZh extends AppLocalizations {
@override @override
String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; 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`). /// The translations for Chinese, using the Han script (`zh_Hans`).
@@ -4372,6 +4425,12 @@ class AppLocalizationsZhHans extends AppLocalizationsZh {
@override @override
String get navigationHome => '首页'; String get navigationHome => '首页';
@override
String get workflow => '工作流';
@override
String get workflowDescription => '在这里编排和管理剪辑工作流。';
@override @override
String get mediaThumbnailSize => '缩略图大小'; String get mediaThumbnailSize => '缩略图大小';
@@ -4409,6 +4468,53 @@ class AppLocalizationsZhHans extends AppLocalizationsZh {
@override @override
String get resourceImportedAudioHint => '导入的音频可在“我的素材”中找到。'; 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`). /// The translations for Chinese, using the Han script (`zh_Hant`).
@@ -6575,6 +6681,12 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
@override @override
String get navigationHome => '首頁'; String get navigationHome => '首頁';
@override
String get workflow => '工作流程';
@override
String get workflowDescription => '在這裡編排和管理剪輯工作流程。';
@override @override
String get mediaThumbnailSize => '縮圖大小'; String get mediaThumbnailSize => '縮圖大小';
@@ -6612,4 +6724,51 @@ class AppLocalizationsZhHant extends AppLocalizationsZh {
@override @override
String get resourceImportedAudioHint => '匯入的音訊可在「我的素材」中找到。'; 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 => '左下圓角';
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Nome: Z a A", "mediaSortNameDescending": "Nome: Z a A",
"mediaSelectedCount": "{count} selecionados", "mediaSelectedCount": "{count} selecionados",
"navigationHome": "Início", "navigationHome": "Início",
"workflow": "Fluxo de trabalho",
"workflowDescription": "Organize e gerencie seus fluxos de trabalho de edição aqui.",
"mediaThumbnailSize": "Tamanho das miniaturas", "mediaThumbnailSize": "Tamanho das miniaturas",
"mediaThumbnailSmall": "Miniaturas pequenas", "mediaThumbnailSmall": "Miniaturas pequenas",
"mediaThumbnailMedium": "Miniaturas médias", "mediaThumbnailMedium": "Miniaturas médias",
@@ -931,5 +933,27 @@
"type": "String" "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"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "Имя: Я–А", "mediaSortNameDescending": "Имя: Я–А",
"mediaSelectedCount": "Выбрано: {count}", "mediaSelectedCount": "Выбрано: {count}",
"navigationHome": "Главная", "navigationHome": "Главная",
"workflow": "Рабочий процесс",
"workflowDescription": "Здесь можно организовывать рабочие процессы монтажа.",
"mediaThumbnailSize": "Размер миниатюр", "mediaThumbnailSize": "Размер миниатюр",
"mediaThumbnailSmall": "Маленькие миниатюры", "mediaThumbnailSmall": "Маленькие миниатюры",
"mediaThumbnailMedium": "Средние миниатюры", "mediaThumbnailMedium": "Средние миниатюры",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "Радиус углов",
"shadow": "Тень",
"addShadow": "Добавить тень",
"shadowLayer": "Тень {number}",
"shadowBlur": "Размытие",
"shadowSpread": "Расширение",
"shadowOpacity": "Непрозрачность",
"moveShadowUp": "Вверх",
"moveShadowDown": "Вниз",
"updateShadowFailed": "Не удалось обновить тень",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "Отдельные углы",
"cornerTopLeft": "Радиус слева сверху",
"cornerTopRight": "Радиус справа сверху",
"cornerBottomRight": "Радиус справа снизу",
"cornerBottomLeft": "Радиус слева снизу"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "名称降序", "mediaSortNameDescending": "名称降序",
"mediaSelectedCount": "已选 {count} 个", "mediaSelectedCount": "已选 {count} 个",
"navigationHome": "首页", "navigationHome": "首页",
"workflow": "工作流",
"workflowDescription": "在这里编排和管理剪辑工作流。",
"mediaThumbnailSize": "缩略图大小", "mediaThumbnailSize": "缩略图大小",
"mediaThumbnailSmall": "小缩略图", "mediaThumbnailSmall": "小缩略图",
"mediaThumbnailMedium": "中缩略图", "mediaThumbnailMedium": "中缩略图",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "圆角",
"shadow": "阴影",
"addShadow": "添加阴影",
"shadowLayer": "阴影 {number}",
"shadowBlur": "模糊",
"shadowSpread": "扩展",
"shadowOpacity": "不透明度",
"moveShadowUp": "上移",
"moveShadowDown": "下移",
"updateShadowFailed": "无法更新阴影",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "独立圆角",
"cornerTopLeft": "左上圆角",
"cornerTopRight": "右上圆角",
"cornerBottomRight": "右下圆角",
"cornerBottomLeft": "左下圆角"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "名称降序", "mediaSortNameDescending": "名称降序",
"mediaSelectedCount": "已选 {count} 个", "mediaSelectedCount": "已选 {count} 个",
"navigationHome": "首页", "navigationHome": "首页",
"workflow": "工作流",
"workflowDescription": "在这里编排和管理剪辑工作流。",
"mediaThumbnailSize": "缩略图大小", "mediaThumbnailSize": "缩略图大小",
"mediaThumbnailSmall": "小缩略图", "mediaThumbnailSmall": "小缩略图",
"mediaThumbnailMedium": "中缩略图", "mediaThumbnailMedium": "中缩略图",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "圆角",
"shadow": "阴影",
"addShadow": "添加阴影",
"shadowLayer": "阴影 {number}",
"shadowBlur": "模糊",
"shadowSpread": "扩展",
"shadowOpacity": "不透明度",
"moveShadowUp": "上移",
"moveShadowDown": "下移",
"updateShadowFailed": "无法更新阴影",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "独立圆角",
"cornerTopLeft": "左上圆角",
"cornerTopRight": "右上圆角",
"cornerBottomRight": "右下圆角",
"cornerBottomLeft": "左下圆角"
} }
+24
View File
@@ -913,6 +913,8 @@
"mediaSortNameDescending": "名稱降冪", "mediaSortNameDescending": "名稱降冪",
"mediaSelectedCount": "已選 {count} 個", "mediaSelectedCount": "已選 {count} 個",
"navigationHome": "首頁", "navigationHome": "首頁",
"workflow": "工作流程",
"workflowDescription": "在這裡編排和管理剪輯工作流程。",
"mediaThumbnailSize": "縮圖大小", "mediaThumbnailSize": "縮圖大小",
"mediaThumbnailSmall": "小縮圖", "mediaThumbnailSmall": "小縮圖",
"mediaThumbnailMedium": "中縮圖", "mediaThumbnailMedium": "中縮圖",
@@ -931,5 +933,27 @@
"type": "String" "type": "String"
} }
} }
},
"cornerRadius": "圓角",
"shadow": "陰影",
"addShadow": "新增陰影",
"shadowLayer": "陰影 {number}",
"shadowBlur": "模糊",
"shadowSpread": "擴展",
"shadowOpacity": "不透明度",
"moveShadowUp": "上移",
"moveShadowDown": "下移",
"updateShadowFailed": "無法更新陰影",
"@shadowLayer": {
"placeholders": {
"number": {
"type": "int"
} }
}
},
"independentCorners": "獨立圓角",
"cornerTopLeft": "左上圓角",
"cornerTopRight": "右上圓角",
"cornerBottomRight": "右下圓角",
"cornerBottomLeft": "左下圓角"
} }
@@ -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.
Binary file not shown.
@@ -63,6 +63,8 @@ abstract final class AppIcons {
static const IconData unlock = PhosphorIconsRegular.lockOpen; static const IconData unlock = PhosphorIconsRegular.lockOpen;
static const IconData fullscreen = PhosphorIconsRegular.arrowsOut; static const IconData fullscreen = PhosphorIconsRegular.arrowsOut;
static const IconData exitFullscreen = PhosphorIconsRegular.arrowsIn; 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 fitContent = PhosphorIconsRegular.cornersIn;
static const IconData menu = PhosphorIconsRegular.list; static const IconData menu = PhosphorIconsRegular.list;
static const IconData sidebar = PhosphorIconsRegular.sidebarSimple; static const IconData sidebar = PhosphorIconsRegular.sidebarSimple;
+202 -61
View File
@@ -174,8 +174,10 @@ abstract final class AppTheme {
: null, : null,
textStyle: WidgetStatePropertyAll( textStyle: WidgetStatePropertyAll(
theme.textTheme.labelLarge?.copyWith( theme.textTheme.labelLarge?.copyWith(
fontSize: desktop ? 13 : 12, fontSize: desktop ? AppInspectorMetrics.fontSize : 12,
height: 1.3, height: desktop
? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize
: 1.3,
fontWeight: desktop && selected ? FontWeight.w500 : FontWeight.w400, fontWeight: desktop && selected ? FontWeight.w500 : FontWeight.w400,
fontVariations: desktop fontVariations: desktop
? [FontVariation('wght', selected ? 500 : 400)] ? [FontVariation('wght', selected ? 500 : 400)]
@@ -188,14 +190,14 @@ abstract final class AppTheme {
foregroundColor: WidgetStatePropertyAll( foregroundColor: WidgetStatePropertyAll(
selected selected
? desktop ? desktop
? colors.primary ? colors.onSurface
: colors.onSurface : colors.onSurface
: colors.onSurfaceVariant, : colors.onSurfaceVariant,
), ),
backgroundColor: WidgetStatePropertyAll( backgroundColor: WidgetStatePropertyAll(
selected selected
? desktop ? desktop
? colors.primary.withValues(alpha: .12) ? colors.surfaceContainer
: colors.onSurface.withValues(alpha: .05) : colors.onSurface.withValues(alpha: .05)
: Colors.transparent, : Colors.transparent,
), ),
@@ -255,6 +257,9 @@ abstract final class AppTheme {
static Color comboboxBackground(BuildContext context) { static Color comboboxBackground(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
if (isCompactInspector(context)) {
return theme.inputDecorationTheme.fillColor!;
}
return theme.brightness == Brightness.dark return theme.brightness == Brightness.dark
? theme.colorScheme.surfaceContainerHighest.withValues(alpha: .3) ? theme.colorScheme.surfaceContainerHighest.withValues(alpha: .3)
: Colors.transparent; : Colors.transparent;
@@ -374,34 +379,12 @@ abstract final class AppTheme {
/// Desktop inspectors use a denser scale than dialogs and settings. /// Desktop inspectors use a denser scale than dialogs and settings.
static ThemeData propertiesPanelTheme(ThemeData theme) { static ThemeData propertiesPanelTheme(ThemeData theme) {
final desktop = theme.extension<DesktopControlDensity>() != null; final desktop = theme.extension<DesktopControlDensity>() != null;
if (desktop) return _desktopPropertiesPanelTheme(theme);
final colors = theme.colorScheme; final colors = theme.colorScheme;
final panelText = desktop final panelText = theme.textTheme;
? theme.textTheme.copyWith( const actionSize = AppControlSize.propertyControl;
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;
ButtonStyle? buttonStyle(ButtonStyle? style) => style?.copyWith( ButtonStyle? buttonStyle(ButtonStyle? style) => style?.copyWith(
textStyle: WidgetStatePropertyAll(panelText.labelLarge), 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 panelColors = colors.copyWith(surface: colors.surfaceContainerLow);
final composerBackground = theme final composerBackground = theme
@@ -415,19 +398,13 @@ abstract final class AppTheme {
borderSide: BorderSide.none, borderSide: BorderSide.none,
); );
return theme.copyWith( return theme.copyWith(
extensions: [
...theme.extensions.values,
if (desktop) const InspectorControlDensity(),
],
canvasColor: colors.surfaceContainerLow, canvasColor: colors.surfaceContainerLow,
colorScheme: panelColors, colorScheme: panelColors,
textTheme: panelText, textTheme: panelText,
primaryTextTheme: panelText, primaryTextTheme: panelText,
inputDecorationTheme: theme.inputDecorationTheme.copyWith( inputDecorationTheme: theme.inputDecorationTheme.copyWith(
constraints: BoxConstraints( constraints: const BoxConstraints(
minHeight: desktop minHeight: AppControlSize.propertyControl,
? AppInspectorMetrics.input
: AppControlSize.propertyControl,
), ),
contentPadding: EdgeInsets.symmetric( contentPadding: EdgeInsets.symmetric(
horizontal: AppSpacing.controlHorizontal, 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) => static bool isCompactInspector(BuildContext context) =>
Theme.of(context).extension<InspectorControlDensity>() != null; Theme.of(context).extension<InspectorControlDensity>() != null;
static EdgeInsets propertySectionPadding(BuildContext context) => static EdgeInsets propertySectionPadding(BuildContext context) =>
isDesktop(context) isDesktop(context)
? const EdgeInsets.symmetric( ? const EdgeInsets.fromLTRB(
horizontal: AppInspectorMetrics.padding, AppInspectorMetrics.padding,
vertical: AppInspectorMetrics.groupGap / 2, 0,
AppInspectorMetrics.trailingPadding,
AppInspectorMetrics.groupGap,
) )
: AppSpacing.panelSection; : AppSpacing.panelSection;
@@ -489,8 +603,12 @@ abstract final class AppTheme {
static TextStyle propertyLabelStyle(BuildContext context) { static TextStyle propertyLabelStyle(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
return theme.textTheme.bodyMedium!.copyWith( return theme.textTheme.bodyMedium!.copyWith(
fontSize: isCompactInspector(context) ? 12 : null, fontSize: isCompactInspector(context)
height: isCompactInspector(context) ? 16 / 12 : null, ? AppInspectorMetrics.fontSize
: null,
height: isCompactInspector(context)
? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize
: null,
leadingDistribution: TextLeadingDistribution.even, leadingDistribution: TextLeadingDistribution.even,
color: theme.colorScheme.onSurfaceVariant, color: theme.colorScheme.onSurfaceVariant,
); );
@@ -500,10 +618,12 @@ abstract final class AppTheme {
Theme.of(context).textTheme.bodyMedium! Theme.of(context).textTheme.bodyMedium!
.copyWith(fontSize: 13, height: 18 / 13); .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) => static TextStyle propertySectionTitleStyle(BuildContext context) =>
Theme.of(context).textTheme.labelLarge!.copyWith( Theme.of(context).textTheme.labelLarge!.copyWith(
height: 1.4, height: isCompactInspector(context)
? AppInspectorMetrics.lineHeight / AppInspectorMetrics.fontSize
: 1.4,
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
); );
@@ -734,30 +854,44 @@ abstract final class AppTheme {
}) { }) {
final colors = Theme.of(context).colorScheme; final colors = Theme.of(context).colorScheme;
final ink = colors.onSurface; final ink = colors.onSurface;
final compact = isCompactInspector(context);
final height = compact
? AppInspectorMetrics.input
: AppControlSize.headerButton;
return ButtonStyle( return ButtonStyle(
minimumSize: const WidgetStatePropertyAll( minimumSize: WidgetStatePropertyAll(Size(0, height)),
Size(0, AppControlSize.headerButton), maximumSize: WidgetStatePropertyAll(Size(double.infinity, height)),
),
maximumSize: const WidgetStatePropertyAll(
Size(double.infinity, AppControlSize.headerButton),
),
tapTargetSize: MaterialTapTargetSize.shrinkWrap, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
textStyle: WidgetStatePropertyAll(toolbarTextStyle(context)), textStyle: WidgetStatePropertyAll(
compact
? inputTextStyle(context).copyWith(
fontVariations: [FontVariation('wght', selected ? 550 : 450)],
)
: toolbarTextStyle(context),
),
padding: const WidgetStatePropertyAll( padding: const WidgetStatePropertyAll(
EdgeInsets.symmetric(horizontal: AppSpacing.small), EdgeInsets.symmetric(horizontal: AppSpacing.small),
), ),
shape: WidgetStatePropertyAll( shape: WidgetStatePropertyAll(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
compact ? AppInspectorMetrics.radius : 8,
),
),
), ),
foregroundColor: WidgetStatePropertyAll( foregroundColor: WidgetStatePropertyAll(
selected selected
? ink ? ink
: compact
? colors.onSurfaceVariant
: Theme.of(context).brightness == Brightness.dark : Theme.of(context).brightness == Brightness.dark
? ink.withValues(alpha: .498) ? ink.withValues(alpha: .498)
: colors.onSurfaceVariant, : colors.onSurfaceVariant,
), ),
backgroundColor: WidgetStatePropertyAll( backgroundColor: WidgetStatePropertyAll(
selected ? ink.withValues(alpha: .05) : Colors.transparent, selected
? (compact ? colors.surfaceContainer : ink.withValues(alpha: .05))
: Colors.transparent,
), ),
overlayColor: WidgetStateProperty.resolveWith((states) { overlayColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.hovered) || if (states.contains(WidgetState.hovered) ||
@@ -1746,16 +1880,16 @@ abstract final class AppDesktopMetrics {
static const windowHeader = 44.0; static const windowHeader = 44.0;
static const panelHeader = 36.0; static const panelHeader = 36.0;
static const timelineTabs = 32.0; static const timelineTabs = 32.0;
static const timelineTabControl = 26.0; static const timelineTabControl = AppInspectorMetrics.input;
static const timelineTabRadius = 7.0; static const timelineTabRadius = AppInspectorMetrics.radius;
static const timelineToolbar = 36.0; static const timelineToolbar = AppInspectorMetrics.row;
static const timelineRuler = 28.0; static const timelineRuler = 28.0;
static const playbackBar = 36.0; static const playbackBar = AppInspectorMetrics.row;
static const iconButton = 28.0; static const iconButton = 28.0;
static const button = 32.0; static const button = 32.0;
static const input = 36.0; static const input = 36.0;
static const sidebarRow = 32.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. /// 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. /// Geometry for desktop parameter editing, independent of general inputs.
abstract final class AppInspectorMetrics { abstract final class AppInspectorMetrics {
static const input = 28.0; static const input = 24.0;
static const action = 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 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<InspectorControlDensity> { class InspectorControlDensity extends ThemeExtension<InspectorControlDensity> {
@@ -124,6 +124,7 @@ class _AppComboboxState<T> extends State<AppCombobox<T>> {
builder: (context, constraints) { builder: (context, constraints) {
final theme = Theme.of(context); final theme = Theme.of(context);
final colors = theme.colorScheme; final colors = theme.colorScheme;
final compact = AppTheme.isCompactInspector(context);
final inputStyle = AppTheme.inputTextStyle( final inputStyle = AppTheme.inputTextStyle(
context, context,
style: AppTheme.isDesktop(context) style: AppTheme.isDesktop(context)
@@ -181,15 +182,21 @@ class _AppComboboxState<T> extends State<AppCombobox<T>> {
AppDesktopMetrics.input AppDesktopMetrics.input
: AppControlSize.input, : AppControlSize.input,
), ),
padding: const EdgeInsetsDirectional.only( padding: EdgeInsetsDirectional.only(
start: AppSpacing.compact, start: compact ? AppSpacing.small : AppSpacing.compact,
end: AppSpacing.tiny, end: compact ? 0 : AppSpacing.tiny,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppTheme.comboboxBackground(context), color: AppTheme.comboboxBackground(context),
borderRadius: BorderRadius.circular(AppRadius.large), borderRadius: BorderRadius.circular(
border: Border.all(color: colors.outlineVariant), compact ? AppInspectorMetrics.radius : AppRadius.large,
boxShadow: [ ),
border: compact
? null
: Border.all(color: colors.outlineVariant),
boxShadow: compact
? []
: [
BoxShadow( BoxShadow(
color: colors.shadow.withValues(alpha: .05), color: colors.shadow.withValues(alpha: .05),
offset: const Offset(0, 1), offset: const Offset(0, 1),
@@ -257,9 +264,9 @@ class _AppComboboxState<T> extends State<AppCombobox<T>> {
icon: Icon( icon: Icon(
AppIcons.expandMore, AppIcons.expandMore,
size: 16, size: 16,
color: colors.onSurfaceVariant.withValues( color: compact
alpha: .5, ? colors.onSurfaceVariant
), : colors.onSurfaceVariant.withValues(alpha: .5),
), ),
), ),
], ],
@@ -32,19 +32,24 @@ class AppCommandToolbar extends StatelessWidget {
final List<AppToolbarCommand> trailing; final List<AppToolbarCommand> trailing;
final Widget? status; final Widget? status;
static const _buttonSize = AppInspectorMetrics.input;
static const _commandSlot = 32.0;
Widget _button(AppToolbarCommand command) => IconButton( Widget _button(AppToolbarCommand command) => IconButton(
key: command.key, key: command.key,
tooltip: command.label, tooltip: command.label,
onPressed: command.onPressed, onPressed: command.onPressed,
icon: Icon(command.icon, semanticLabel: command.semanticLabel, size: 16), icon: Icon(command.icon, semanticLabel: command.semanticLabel, size: 16),
style: IconButton.styleFrom( style: IconButton.styleFrom(
fixedSize: const Size.square(AppDesktopMetrics.iconButton), fixedSize: const Size.square(_buttonSize),
minimumSize: const Size.square(AppDesktopMetrics.iconButton), minimumSize: const Size.square(_buttonSize),
maximumSize: const Size.square(AppDesktopMetrics.iconButton), maximumSize: const Size.square(_buttonSize),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
tapTargetSize: MaterialTapTargetSize.shrinkWrap, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: const RoundedRectangleBorder( 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( Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
final commands = groups.expand((group) => group).toList(); 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 groupSpace = (groups.length - 1).clamp(0, groups.length) * 16;
final allFit = final allFit =
constraints.maxWidth >= commands.length * 32 + groupSpace + reserved; constraints.maxWidth >=
commands.length * _commandSlot + groupSpace + reserved;
final visibleCount = allFit final visibleCount = allFit
? commands.length ? commands.length
: ((constraints.maxWidth - reserved - groupSpace - 36) / 32) : ((constraints.maxWidth - reserved - groupSpace - 36) / _commandSlot)
.floor() .floor()
.clamp(0, commands.length); .clamp(0, commands.length);
final hidden = commands.skip(visibleCount).toList(); final hidden = commands.skip(visibleCount).toList();
@@ -75,7 +82,7 @@ class AppCommandToolbar extends StatelessWidget {
for (final command in group) for (final command in group)
if (index++ < visibleCount) ...[ if (index++ < visibleCount) ...[
_button(command), _button(command),
const SizedBox(width: 4), const SizedBox(width: 8),
], ],
], ],
if (hidden.isNotEmpty) if (hidden.isNotEmpty)
@@ -9,7 +9,7 @@ import 'app_command_toolbar.dart';
@Preview( @Preview(
name: 'Timeline commands — light', name: 'Timeline commands — light',
group: 'Desktop workspace', group: 'Desktop workspace',
size: Size(480, 36), size: Size(480, 32),
) )
Widget desktopTimelineToolbarLightPreview() => Widget desktopTimelineToolbarLightPreview() =>
_toolbarPreview(Brightness.light); _toolbarPreview(Brightness.light);
@@ -17,12 +17,12 @@ Widget desktopTimelineToolbarLightPreview() =>
@Preview( @Preview(
name: 'Timeline commands — dark', name: 'Timeline commands — dark',
group: 'Desktop workspace', group: 'Desktop workspace',
size: Size(480, 36), size: Size(480, 32),
) )
@Preview( @Preview(
name: 'Narrow timeline commands', name: 'Narrow timeline commands',
group: 'Desktop workspace', group: 'Desktop workspace',
size: Size(180, 36), size: Size(180, 32),
) )
Widget desktopTimelineToolbarPreview() => _toolbarPreview(Brightness.dark); Widget desktopTimelineToolbarPreview() => _toolbarPreview(Brightness.dark);
@@ -36,7 +36,7 @@ Widget _toolbarPreview(Brightness brightness) => MaterialApp(
Widget desktopTimelineCommands() => Material( Widget desktopTimelineCommands() => Material(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8), padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium),
child: AppCommandToolbar( child: AppCommandToolbar(
groups: [ groups: [
[ [
@@ -453,6 +453,7 @@ class AppSelect<T> extends StatelessWidget {
builder: (context, constraints) { builder: (context, constraints) {
final theme = Theme.of(context); final theme = Theme.of(context);
final colors = theme.colorScheme; final colors = theme.colorScheme;
final compact = AppTheme.isCompactInspector(context);
final current = options final current = options
.where((option) => option.value == value) .where((option) => option.value == value)
.firstOrNull; .firstOrNull;
@@ -484,8 +485,10 @@ class AppSelect<T> extends StatelessWidget {
child: AnimatedContainer( child: AnimatedContainer(
duration: const Duration(milliseconds: 100), duration: const Duration(milliseconds: 100),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(AppRadius.large), borderRadius: BorderRadius.circular(
boxShadow: outlined compact ? AppInspectorMetrics.radius : AppRadius.large,
),
boxShadow: outlined && !compact
? [ ? [
BoxShadow( BoxShadow(
color: colors.shadow.withValues(alpha: .05), color: colors.shadow.withValues(alpha: .05),
@@ -526,7 +529,11 @@ class AppSelect<T> extends StatelessWidget {
), ),
tapTargetSize: MaterialTapTargetSize.shrinkWrap, tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppRadius.large), borderRadius: BorderRadius.circular(
compact
? AppInspectorMetrics.radius
: AppRadius.large,
),
), ),
side: outlined side: outlined
? theme ? theme
@@ -536,8 +543,12 @@ class AppSelect<T> extends StatelessWidget {
BorderSide(color: colors.outlineVariant) BorderSide(color: colors.outlineVariant)
: null, : null,
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: outlined ? 12 : AppSpacing.tiny, horizontal: outlined
vertical: outlined ? AppSpacing.inputVertical : 0, ? (compact ? 8 : 12)
: AppSpacing.tiny,
vertical: outlined && !compact
? AppSpacing.inputVertical
: 0,
), ),
), ),
child: Row( child: Row(
@@ -557,9 +568,9 @@ class AppSelect<T> extends StatelessWidget {
Icon( Icon(
AppIcons.expandMore, AppIcons.expandMore,
size: 16, size: 16,
color: colors.onSurfaceVariant.withValues( color: compact
alpha: .5, ? colors.onSurfaceVariant
), : colors.onSurfaceVariant.withValues(alpha: .5),
), ),
], ],
), ),
@@ -2,6 +2,36 @@ import 'package:flutter/material.dart';
import '../theme/app_theme.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. /// An inspector property title, its actions, and the controls below it.
class AppPropertyGroup extends StatelessWidget { class AppPropertyGroup extends StatelessWidget {
const AppPropertyGroup({ const AppPropertyGroup({
@@ -10,22 +40,28 @@ class AppPropertyGroup extends StatelessWidget {
required this.child, required this.child,
this.labelWidget, this.labelWidget,
this.actions = const [], this.actions = const [],
this.padChild = true,
}); });
final String label; final String label;
final Widget? labelWidget; final Widget? labelWidget;
final List<Widget> actions; final List<Widget> actions;
/// Set to false when the child contains [AppPropertyRow] widgets.
final bool padChild;
final Widget child; final Widget child;
@override @override
Widget build(BuildContext context) => Column( Widget build(BuildContext context) {
final compact = AppTheme.isCompactInspector(context);
return Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: AppTheme.isDesktop(context) minHeight: compact
? AppInspectorMetrics.action ? AppInspectorMetrics.sectionHeader
: AppControlSize.propertyControl, : AppControlSize.propertyControl,
), ),
child: Row( child: Row(
@@ -39,14 +75,74 @@ class AppPropertyGroup extends StatelessWidget {
), ),
), ),
for (final action in actions) ...[ for (final action in actions) ...[
SizedBox(width: AppTheme.propertyRowGap(context)), SizedBox(
width: compact
? AppSpacing.tiny
: AppTheme.propertyRowGap(context),
),
action, action,
], ],
], ],
), ),
), ),
if (compact && padChild)
Padding(
padding: const EdgeInsets.symmetric(
vertical: AppInspectorMetrics.rowPadding,
),
child: child,
)
else if (compact)
child
else ...[
SizedBox(height: AppTheme.propertyRowGap(context)), SizedBox(height: AppTheme.propertyRowGap(context)),
child, 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<Widget> children;
final Widget? trailing;
final bool reserveTrailing;
final List<int>? 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),
),
],
],
),
),
); );
} }
@@ -6,23 +6,24 @@ import '../theme/app_palette.dart';
import '../theme/app_theme.dart'; import '../theme/app_theme.dart';
import 'app_property_group.dart'; import 'app_property_group.dart';
import 'app_text_field.dart'; import 'app_text_field.dart';
import 'app_button_group.dart';
@Preview( @Preview(
name: 'Property groups — light', name: 'Property groups — light',
group: 'Desktop inspector', group: 'Desktop inspector',
size: Size(280, 240), size: Size(240, 360),
) )
Widget propertyGroupsLightPreview() => _preview(Brightness.light); Widget propertyGroupsLightPreview() => _preview(Brightness.light);
@Preview( @Preview(
name: 'Property groups — dark', name: 'Property groups — dark',
group: 'Desktop inspector', group: 'Desktop inspector',
size: Size(280, 240), size: Size(240, 360),
) )
@Preview( @Preview(
name: 'Narrow property groups', name: 'Narrow property groups',
group: 'Desktop inspector', group: 'Desktop inspector',
size: Size(220, 240), size: Size(220, 360),
) )
Widget propertyGroupsDarkPreview() => _preview(Brightness.dark); Widget propertyGroupsDarkPreview() => _preview(Brightness.dark);
@@ -49,6 +50,7 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> {
TextEditingController(text: '100'), TextEditingController(text: '100'),
TextEditingController(text: '100'), TextEditingController(text: '100'),
TextEditingController(text: '0'), TextEditingController(text: '0'),
TextEditingController(text: '0'),
]; ];
bool _locked = true; bool _locked = true;
final _keyed = <int>{}; final _keyed = <int>{};
@@ -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: [ children: [
Expanded( AppTextField(label: a, unit: unit, controller: _values[index]),
child: AppTextField(label: a, unit: unit, controller: _values[index]), AppTextField(label: b, unit: unit, controller: _values[index + 1]),
),
const SizedBox(width: 4),
Expanded(
child: AppTextField(
label: b,
unit: unit,
controller: _values[index + 1],
),
),
], ],
); );
@@ -93,41 +93,100 @@ class _PropertyGroupsPreviewState extends State<_PropertyGroupsPreview> {
for (final group in [ for (final group in [
AppPropertyGroup( AppPropertyGroup(
label: '位置', label: '位置',
actions: [_keyframe(0)], padChild: false,
child: _pair('X', 'Y', 0), 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( AppPropertyGroup(
label: '缩放', label: '缩放',
actions: [ actions: [_keyframe(1)],
IconButton( padChild: false,
child: _pair(
'W',
'H',
2,
unit: '%',
trailing: IconButton(
tooltip: 'Lock aspect ratio', tooltip: 'Lock aspect ratio',
isSelected: _locked, isSelected: _locked,
icon: const Icon(AppIcons.unlock), icon: const Icon(AppIcons.unlock),
selectedIcon: const Icon(AppIcons.lockFilled), selectedIcon: const Icon(AppIcons.lockFilled),
onPressed: () => setState(() => _locked = !_locked), onPressed: () => setState(() => _locked = !_locked),
), ),
_keyframe(1), ),
],
child: _pair('W', 'H', 2, unit: '%'),
), ),
AppPropertyGroup( AppPropertyGroup(
label: '旋转', label: '圆角',
actions: [_keyframe(2)], padChild: false,
child: AppTextField( child: AppPropertyRow(
label: '旋转', trailing: _keyframe(3),
leading: const Padding( children: [
padding: EdgeInsets.symmetric(horizontal: 8), AppTextField(
child: Icon(AppIcons.angle, size: 14), label: '圆角',
leading: const SizedBox(
width: AppInspectorMetrics.action,
child: Center(child: Icon(AppIcons.cornerRadius, size: 14)),
), ),
unit: '°', controller: _values[5],
controller: _values[4], ),
const SizedBox.shrink(),
],
), ),
), ),
]) ])
Padding( AppPropertySection(child: group),
padding: AppTheme.propertySectionPadding(context),
child: group,
),
], ],
), ),
); );
@@ -40,7 +40,9 @@ class _AppSwitchState extends State<AppSwitch> {
onFocusChange: (value) => setState(() => _focused = value), onFocusChange: (value) => setState(() => _focused = value),
child: SizedBox( child: SizedBox(
width: width, width: width,
height: 36, height: AppTheme.isCompactInspector(context)
? AppInspectorMetrics.input
: 36,
child: Stack( child: Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
@@ -65,6 +65,7 @@ class _AppTextFieldState extends State<AppTextField> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
final colors = theme.colorScheme; final colors = theme.colorScheme;
final compact = AppTheme.isCompactInspector(context);
final foreground = widget.enabled final foreground = widget.enabled
? colors.onSurface ? colors.onSurface
: colors.onSurface.withValues(alpha: 0.38); : colors.onSurface.withValues(alpha: 0.38);
@@ -72,9 +73,11 @@ class _AppTextFieldState extends State<AppTextField> {
final borderless = final borderless =
theme.inputDecorationTheme.enabledBorder?.borderSide == BorderSide.none; theme.inputDecorationTheme.enabledBorder?.borderSide == BorderSide.none;
final style = AppTheme.inputTextStyle(context) final style = AppTheme.inputTextStyle(context)
.copyWith(color: foreground, letterSpacing: 0); .copyWith(color: foreground, letterSpacing: compact ? null : 0);
OutlineInputBorder border(Color color) => OutlineInputBorder( OutlineInputBorder border(Color color) => OutlineInputBorder(
borderRadius: BorderRadius.circular(AppRadius.large), borderRadius: BorderRadius.circular(
compact ? AppInspectorMetrics.radius : AppRadius.large,
),
borderSide: BorderSide(color: color), borderSide: BorderSide(color: color),
); );
@@ -107,8 +110,16 @@ class _AppTextFieldState extends State<AppTextField> {
hintStyle: AppTheme.inputHintStyle(context, style: style), hintStyle: AppTheme.inputHintStyle(context, style: style),
errorText: widget.errorText, errorText: widget.errorText,
errorMaxLines: 2, errorMaxLines: 2,
contentPadding: contentPadding: compact && widget.maxLines == 1
theme.inputDecorationTheme.contentPadding ?? ? EdgeInsets.fromLTRB(
!labelAbove && (widget.leading != null || widget.label != null)
? 0
: 8,
4,
widget.unit == null ? 8 : 0,
4,
)
: theme.inputDecorationTheme.contentPadding ??
const EdgeInsets.symmetric( const EdgeInsets.symmetric(
horizontal: AppSpacing.controlHorizontal, horizontal: AppSpacing.controlHorizontal,
vertical: AppSpacing.inputVertical, vertical: AppSpacing.inputVertical,
@@ -122,12 +133,19 @@ class _AppTextFieldState extends State<AppTextField> {
widthFactor: 1, widthFactor: 1,
heightFactor: 1, heightFactor: 1,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: AppSpacing.small, horizontal: compact && widget.label!.length == 1
? 0
: AppSpacing.small,
), ),
child: ExcludeSemantics( child: ExcludeSemantics(
child: SizedBox(
width: compact && widget.label!.length == 1
? AppInspectorMetrics.action
: null,
child: Text( child: Text(
widget.label!, widget.label!,
textAlign: TextAlign.center,
style: AppTheme.propertyLabelStyle(context) style: AppTheme.propertyLabelStyle(context)
.copyWith( .copyWith(
color: widget.enabled color: widget.enabled
@@ -137,6 +155,7 @@ class _AppTextFieldState extends State<AppTextField> {
), ),
), ),
), ),
),
)), )),
prefixIconConstraints: const BoxConstraints( prefixIconConstraints: const BoxConstraints(
minWidth: AppControlSize.standard, minWidth: AppControlSize.standard,
@@ -148,8 +167,8 @@ class _AppTextFieldState extends State<AppTextField> {
widthFactor: 1, widthFactor: 1,
heightFactor: 1, heightFactor: 1,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: AppSpacing.small, horizontal: compact ? 4 : AppSpacing.small,
), ),
child: ExcludeSemantics( child: ExcludeSemantics(
child: Text( child: Text(
@@ -163,8 +182,8 @@ class _AppTextFieldState extends State<AppTextField> {
), ),
), ),
), ),
suffixIconConstraints: const BoxConstraints( suffixIconConstraints: BoxConstraints(
minWidth: AppControlSize.compact, minWidth: compact ? 16 : AppControlSize.compact,
minHeight: AppControlSize.input, minHeight: AppControlSize.input,
), ),
border: theme.inputDecorationTheme.border, border: theme.inputDecorationTheme.border,
@@ -201,7 +220,39 @@ class _AppTextFieldState extends State<AppTextField> {
child: Semantics( child: Semantics(
label: [widget.label, widget.unit].whereType<String>().join(' '), label: [widget.label, widget.unit].whereType<String>().join(' '),
child: labelAbove child: labelAbove
? AppPropertyGroup( ? 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 ?? '', label: widget.label ?? '',
labelWidget: widget.leading, labelWidget: widget.leading,
actions: widget.labelActions, actions: widget.labelActions,
@@ -24,8 +24,8 @@ class AppToolbarDropdownButton extends StatelessWidget {
key: buttonKey, key: buttonKey,
focusNode: focusNode, focusNode: focusNode,
onPressed: onPressed, onPressed: onPressed,
style: AppTheme.toolbarButtonStyle(context) style: (style ?? const ButtonStyle())
.merge(style) .merge(AppTheme.toolbarButtonStyle(context))
.copyWith( .copyWith(
backgroundColor: const WidgetStatePropertyAll(Colors.transparent), backgroundColor: const WidgetStatePropertyAll(Colors.transparent),
overlayColor: WidgetStateProperty.resolveWith((states) { overlayColor: WidgetStateProperty.resolveWith((states) {
@@ -24,14 +24,19 @@ class CompactPanelTabs<T> extends StatelessWidget {
@override @override
Widget build(BuildContext context) => SizedBox( Widget build(BuildContext context) => SizedBox(
height: AppTheme.isDesktop(context) height: AppTheme.isCompactInspector(context)
? AppInspectorMetrics.sectionHeader
: AppTheme.isDesktop(context)
? AppDesktopMetrics.panelHeader ? AppDesktopMetrics.panelHeader
: height, : height,
child: Padding( child: Padding(
padding: padding:
AppTheme.isDesktop(context) && AppTheme.isDesktop(context) &&
padding == const EdgeInsets.all(AppSpacing.gap) padding == const EdgeInsets.all(AppSpacing.gap)
? const EdgeInsets.symmetric(horizontal: 8, vertical: 4) ? EdgeInsets.symmetric(
horizontal: 8,
vertical: AppTheme.isCompactInspector(context) ? 8 : 4,
)
: padding, : padding,
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
@@ -53,7 +53,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> {
child: SizedBox( child: SizedBox(
height: AppDesktopMetrics.timelineTabs, height: AppDesktopMetrics.timelineTabs,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.tiny), padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@@ -117,7 +117,7 @@ class _TimelineControlsPreviewState extends State<_TimelineControlsPreview> {
SizedBox( SizedBox(
height: AppDesktopMetrics.timelineToolbar, height: AppDesktopMetrics.timelineToolbar,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.small), padding: const EdgeInsets.symmetric(horizontal: AppSpacing.medium),
child: AppCommandToolbar( child: AppCommandToolbar(
groups: [ groups: [
[ [
@@ -53,7 +53,9 @@ class WorkspacePanel extends StatelessWidget {
title, title,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, 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?) ...[ if (controls case final controls?) ...[
+4
View File
@@ -18,6 +18,9 @@ dev_dependencies:
freezed: ^4.0.2 freezed: ^4.0.2
flutter: flutter:
fonts: fonts:
- family: Inter
fonts:
- asset: assets/fonts/InterVariable.ttf
- family: PhosphorRegular - family: PhosphorRegular
fonts: fonts:
- asset: assets/fonts/PhosphorRegular.ttf - asset: assets/fonts/PhosphorRegular.ttf
@@ -25,4 +28,5 @@ flutter:
fonts: fonts:
- asset: assets/fonts/PhosphorFill.ttf - asset: assets/fonts/PhosphorFill.ttf
assets: assets:
- assets/fonts/INTER_LICENSE.txt
- assets/fonts/PHOSPHOR_LICENSE.txt - assets/fonts/PHOSPHOR_LICENSE.txt
@@ -19,8 +19,7 @@ void main() {
home: Scaffold( home: Scaffold(
body: SizedBox( body: SizedBox(
width: 220, width: 220,
child: Padding( child: AppPropertySection(
padding: const EdgeInsets.all(12),
child: AppPropertyGroup( child: AppPropertyGroup(
label: 'Position', label: 'Position',
actions: [ actions: [
@@ -38,7 +37,7 @@ void main() {
errorText: 'Invalid value', errorText: 'Invalid value',
), ),
), ),
SizedBox(width: 4), SizedBox(width: AppInspectorMetrics.rowGap),
Expanded(child: AppTextField(label: 'Y')), Expanded(child: AppTextField(label: 'Y')),
], ],
), ),
@@ -51,8 +50,8 @@ void main() {
await tester.pumpAndSettle(); await tester.pumpAndSettle();
final first = find.byType(TextField).first; final first = find.byType(TextField).first;
final second = find.byType(TextField).last; final second = find.byType(TextField).last;
expect(tester.getRect(first).width, 96); expect(tester.getRect(first).width, 94);
expect(tester.getRect(second).right, 208); expect(tester.getRect(second).right, 212);
expect(tester.getRect(first).top, tester.getRect(second).top); expect(tester.getRect(first).top, tester.getRect(second).top);
expect( expect(
tester.getRect(first).height, tester.getRect(first).height,
@@ -60,7 +59,7 @@ void main() {
); );
expect( expect(
tester.getRect(find.byType(IconButton)).bottom, tester.getRect(find.byType(IconButton)).bottom,
tester.getRect(first).top - 4, tester.getRect(first).top - 12,
); );
expect( expect(
tester.widget<TextField>(first).decoration!.prefixIcon, tester.widget<TextField>(first).decoration!.prefixIcon,
+71 -4
View File
@@ -7,12 +7,79 @@ import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
void main() { 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', ( testWidgets('slider density follows inspector and desktop contexts', (
tester, tester,
) async { ) async {
final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark);
for (final (theme, height) in [ for (final (theme, height) in [
(AppTheme.propertiesPanelTheme(desktop), 28.0), (AppTheme.propertiesPanelTheme(desktop), 24.0),
(desktop, 36.0), (desktop, 36.0),
( (
AppTheme.propertiesPanelTheme(AppTheme.penDark), AppTheme.propertiesPanelTheme(AppTheme.penDark),
@@ -44,9 +111,9 @@ void main() {
final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark); final desktop = AppTheme.desktopWorkspaceTheme(AppTheme.penDark);
final inspector = AppTheme.propertiesPanelTheme(desktop); final inspector = AppTheme.propertiesPanelTheme(desktop);
expect(desktop.inputDecorationTheme.constraints!.minHeight, 36); expect(desktop.inputDecorationTheme.constraints!.minHeight, 36);
expect(inspector.inputDecorationTheme.constraints!.minHeight, 28); expect(inspector.inputDecorationTheme.constraints!.minHeight, 24);
expect(inspector.textTheme.bodyMedium!.fontSize, 13); expect(inspector.textTheme.bodyMedium!.fontSize, 11);
expect(inspector.textTheme.bodySmall!.fontSize, 12); expect(inspector.textTheme.bodySmall!.fontSize, 11);
expect( expect(
inspector.iconButtonTheme.style!.fixedSize!.resolve({}), inspector.iconButtonTheme.style!.fixedSize!.resolve({}),
const Size.square(24), const Size.square(24),