Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
142 lines
5.0 KiB
Dart
142 lines
5.0 KiB
Dart
import 'package:cutdex_ui/icons.dart';
|
|
import 'package:cutdex/l10n/l10n.dart';
|
|
import 'package:cutdex_ui/widgets.dart';
|
|
import 'package:cutdex_ui/theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// Empty values while a project's content is being bound to its cards.
|
|
class EditorEmptyPanel extends StatelessWidget {
|
|
const EditorEmptyPanel({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) =>
|
|
const WorkspacePanel(child: SizedBox.expand());
|
|
}
|
|
|
|
class EditorTimelineDefaults extends StatelessWidget {
|
|
const EditorTimelineDefaults({super.key, this.showTabs = true});
|
|
|
|
final bool showTabs;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => Column(
|
|
children: [
|
|
if (showTabs) ...[
|
|
ColoredBox(
|
|
key: const Key('timeline-tabs-background'),
|
|
color: AppTheme.timelineTabsBackground(context),
|
|
child: SizedBox(
|
|
key: const Key('timeline-tabs-bar'),
|
|
height: AppTheme.isDesktop(context)
|
|
? AppDesktopMetrics.timelineTabs
|
|
: 26,
|
|
child: Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
horizontal: AppTheme.isDesktop(context) ? AppSpacing.small : 0,
|
|
),
|
|
child: Row(
|
|
children: [
|
|
if (AppTheme.isDesktop(context))
|
|
SizedBox.square(
|
|
dimension: AppDesktopMetrics.timelineTabControl,
|
|
child: IconButton(
|
|
key: const Key('timeline-add-button'),
|
|
onPressed: null,
|
|
style: AppTheme.timelineTabActionStyle,
|
|
icon: const Icon(AppIcons.add, size: 16),
|
|
),
|
|
)
|
|
else
|
|
const IconButton(
|
|
onPressed: null,
|
|
icon: Icon(AppIcons.add, size: 16),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const Divider(height: 1),
|
|
],
|
|
Expanded(
|
|
child: WorkspacePanel(
|
|
headerHeight: AppTheme.isDesktop(context)
|
|
? AppDesktopMetrics.timelineToolbar
|
|
: 32,
|
|
headerPadding: EdgeInsets.zero,
|
|
controls: SizedBox(
|
|
key: const Key('timeline-toolbar'),
|
|
height: AppTheme.isDesktop(context)
|
|
? AppDesktopMetrics.timelineToolbar
|
|
: 32,
|
|
child: !AppTheme.isDesktop(context)
|
|
? SingleChildScrollView(
|
|
scrollDirection: Axis.horizontal,
|
|
child: Row(
|
|
children: [
|
|
for (final icon in [
|
|
AppIcons.undo,
|
|
AppIcons.redo,
|
|
AppIcons.cut,
|
|
AppIcons.alignLeft,
|
|
AppIcons.alignRight,
|
|
AppIcons.delete,
|
|
])
|
|
IconButton(
|
|
onPressed: null,
|
|
icon: Icon(icon, size: 16),
|
|
),
|
|
],
|
|
),
|
|
)
|
|
: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: AppSpacing.medium,
|
|
),
|
|
child: AppCommandToolbar(
|
|
groups: [
|
|
[
|
|
AppToolbarCommand(
|
|
label: context.l10n.undo,
|
|
icon: AppIcons.undo,
|
|
onPressed: null,
|
|
),
|
|
AppToolbarCommand(
|
|
label: context.l10n.redo,
|
|
icon: AppIcons.redo,
|
|
onPressed: null,
|
|
),
|
|
],
|
|
[
|
|
AppToolbarCommand(
|
|
label: context.l10n.splitAtPlayhead,
|
|
icon: AppIcons.cut,
|
|
onPressed: null,
|
|
),
|
|
AppToolbarCommand(
|
|
label: context.l10n.trimLeftTooltip,
|
|
icon: AppIcons.alignLeft,
|
|
onPressed: null,
|
|
),
|
|
AppToolbarCommand(
|
|
label: context.l10n.trimRightTooltip,
|
|
icon: AppIcons.alignRight,
|
|
onPressed: null,
|
|
),
|
|
AppToolbarCommand(
|
|
label: context.l10n.deleteSelectedClips,
|
|
icon: AppIcons.delete,
|
|
onPressed: null,
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
),
|
|
child: const SizedBox.expand(key: Key('timeline-default-tracks')),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|