Move editor UI into the app and release verified Core dependencies (#14)
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

This commit was merged in pull request #14.
This commit is contained in:
lingjhf committed 2026-10-11 19:59:40 +00:00
1 parent abc1868550
commit 06f1c26681
452 files changed
+43806 -2329

No files matched your search

+101 -60
View File
@@ -9,9 +9,9 @@ import 'package:cutdex/l10n/l10n.dart';
import 'dart:math' as math;
import 'package:cutdex/features/properties/animation_labels.dart';
import 'package:cutdex_sdk/editor.dart';
import 'package:cutdex_sdk/preview.dart';
import 'package:cutdex_sdk/timeline/model.dart';
import 'package:cutdex_core/editor.dart';
import 'package:cutdex_preview/cutdex_preview.dart';
import 'package:cutdex_core/timeline/model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -180,7 +180,7 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
}
},
child: ListenableSelector<Object>(
listenable: preview,
listenable: Listenable.merge([preview, preview.positionChanges]),
select: () {
final mask = preview.maskFor(widget.element);
final animation = preview.maskAnimation(widget.element);
@@ -264,10 +264,11 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
}) => PropertyNumberInput(
key: ValueKey((selectedId, label)),
label: label,
inlineLabel: inlineLabel,
labelActions: AppTheme.isDesktop(context) && !inlineLabel
? [key(label)]
: const [],
inlineLabel: inlineLabel || AppTheme.isDesktop(context),
prefix: AppTheme.isDesktop(context) && !inlineLabel ? '' : null,
prefixIcon: AppTheme.isDesktop(context) && wrapRotation
? AppIcons.angle
: null,
unit: unit,
value: value,
enabled: enabled,
@@ -338,45 +339,65 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
if (mounted) setState(() => _scrubField = null);
},
);
Widget axes(String label, Widget first, Widget second) =>
LayoutBuilder(
builder: (context, constraints) {
final desktop = AppTheme.isDesktop(context);
final gap = AppTheme.propertyRowGap(context);
final pair = constraints.maxWidth < (desktop ? 180 : 240)
? Column(
children: [
first,
SizedBox(height: gap),
second,
],
)
: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: first),
SizedBox(width: gap),
Expanded(child: second),
],
);
return desktop
? AppPropertyGroup(
label: label,
actions: [key(label)],
child: pair,
)
: Row(
children: [
Expanded(child: pair),
SizedBox(width: gap),
key(label),
],
);
},
Widget axes(
String label,
Widget first,
Widget second, {
Widget? additional,
}) => LayoutBuilder(
builder: (context, constraints) {
final desktop = AppTheme.isDesktop(context);
final gap = AppTheme.propertyRowGap(context);
if (desktop) {
return AppPropertyGroup(
label: label,
padChild: false,
child: Column(
children: [
AppPropertyRow(
trailing: key(label),
children: [first, second],
),
?additional,
],
),
);
}
final pair = constraints.maxWidth < 240
? Column(
children: [
first,
SizedBox(height: gap),
second,
],
)
: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: first),
SizedBox(width: gap),
Expanded(child: second),
],
);
return Row(
children: [
Expanded(child: pair),
SizedBox(width: gap),
key(label),
],
);
},
);
Widget singleField(String label, Widget input) =>
AppTheme.isDesktop(context)
? input
? AppPropertyGroup(
label: label,
padChild: false,
child: AppPropertyRow(
trailing: key(label),
children: [input],
),
)
: Row(
children: [
Expanded(child: input),
@@ -395,8 +416,7 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
style: AppTheme.propertySectionTitleStyle(context),
),
);
Widget section(List<Widget> children) => Padding(
padding: AppTheme.propertySectionPadding(context),
Widget section(List<Widget> children) => AppPropertySection(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: children,
@@ -586,8 +606,11 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
if (AppTheme.isDesktop(context))
AppPropertyGroup(
label: context.l10n.type,
actions: [shapeReset()],
child: shapeSelector(),
padChild: false,
child: AppPropertyRow(
trailing: shapeReset(),
children: [shapeSelector()],
),
)
else
Row(
@@ -620,22 +643,40 @@ class _MaskPropertiesState extends ConsumerState<MaskProperties> {
unit: '%',
inlineLabel: true,
),
additional: AppTheme.isDesktop(context)
? AppPropertyRow(
trailing: key(context.l10n.rotation),
children: [
field(
context.l10n.rotation,
mask.rotation,
-180,
180,
(v) => mask.copyWith(rotation: v),
unit: '°',
wrapRotation: true,
),
const SizedBox.shrink(),
],
)
: null,
),
]),
section([
singleField(
context.l10n.rotation,
field(
if (!AppTheme.isDesktop(context))
section([
singleField(
context.l10n.rotation,
mask.rotation,
-180,
180,
(v) => mask.copyWith(rotation: v),
unit: '°',
wrapRotation: true,
field(
context.l10n.rotation,
mask.rotation,
-180,
180,
(v) => mask.copyWith(rotation: v),
unit: '°',
wrapRotation: true,
),
),
),
]),
]),
section([
heading(context.l10n.size),
axes(