diff --git a/app/lib/actions/svg_export.dart b/app/lib/actions/svg_export.dart index e3c8401fe6e9..b0fa27e36ca1 100644 --- a/app/lib/actions/svg_export.dart +++ b/app/lib/actions/svg_export.dart @@ -22,7 +22,7 @@ class SvgExportAction extends Action { builder: (context) => BlocProvider.value( value: bloc, child: GeneralExportDialog( - preset: ExportTransformPreset.page, + preset: ExportTransformPreset.view, options: getDefaultSvgExportOptions( context, transform: transform, diff --git a/app/lib/dialogs/background/dialog.dart b/app/lib/dialogs/background/dialog.dart index ba88b0a685a2..b9e1fdb792e0 100644 --- a/app/lib/dialogs/background/dialog.dart +++ b/app/lib/dialogs/background/dialog.dart @@ -11,8 +11,6 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:material_leap/material_leap.dart'; import 'package:phosphor_flutter/phosphor_flutter.dart'; -import '../../selections/selection.dart'; - part 'general.dart'; part 'properties/texture.dart'; part 'properties/image.dart'; diff --git a/app/lib/dialogs/background/properties/image.dart b/app/lib/dialogs/background/properties/image.dart index ce33fae46e34..30dbc923f506 100644 --- a/app/lib/dialogs/background/properties/image.dart +++ b/app/lib/dialogs/background/properties/image.dart @@ -13,7 +13,7 @@ class _ImageBackgroundPropertiesView extends StatelessWidget { Widget build(BuildContext context) { return ListView( children: [ - OffsetPropertyView( + OffsetListTile( title: Text(AppLocalizations.of(context).scale), value: Offset(value.scaleX, value.scaleY), onChanged: (value) => onChanged( diff --git a/app/lib/dialogs/background/properties/svg.dart b/app/lib/dialogs/background/properties/svg.dart index 45df73929498..f9e94f669e75 100644 --- a/app/lib/dialogs/background/properties/svg.dart +++ b/app/lib/dialogs/background/properties/svg.dart @@ -13,7 +13,7 @@ class _SvgBackgroundPropertiesView extends StatelessWidget { Widget build(BuildContext context) { return ListView( children: [ - OffsetPropertyView( + OffsetListTile( title: Text(AppLocalizations.of(context).scale), value: Offset(value.scaleX, value.scaleY), onChanged: (value) => onChanged( diff --git a/app/lib/dialogs/export/general.dart b/app/lib/dialogs/export/general.dart index dd1540e2dc01..be5494bbb1f5 100644 --- a/app/lib/dialogs/export/general.dart +++ b/app/lib/dialogs/export/general.dart @@ -53,16 +53,6 @@ class GeneralExportDialog extends StatefulWidget { } class _GeneralExportDialogState extends State { - final TextEditingController _xController = TextEditingController(text: '0'); - - final TextEditingController _yController = TextEditingController(text: '0'); - - final TextEditingController _widthController = - TextEditingController(text: '1000'); - - final TextEditingController _heightController = - TextEditingController(text: '1000'); - ExportTransformPreset? _preset; late ExportOptions _options; @@ -73,29 +63,12 @@ class _GeneralExportDialogState extends State { @override void initState() { _preset = widget.preset; - _applyOptions(widget.options); + _options = widget.options; _regeneratePreviewImage(); super.initState(); } - @override - void dispose() { - super.dispose(); - _xController.dispose(); - _yController.dispose(); - _widthController.dispose(); - _heightController.dispose(); - } - - void _applyOptions(ExportOptions options) { - _options = options; - _xController.text = _options.x.toString(); - _yController.text = _options.y.toString(); - _widthController.text = _options.width.toString(); - _heightController.text = _options.height.toString(); - } - Future _regeneratePreviewImage() async { if (_regeneratingFuture != null) return; var imageFuture = generateImage(); @@ -250,14 +223,18 @@ class _GeneralExportDialogState extends State { ?.state .transformCubit .state; - _applyOptions(switch (_options) { - ImageExportOptions _ => getDefaultImageExportOptions( - context, - transform: transform), - SvgExportOptions _ => getDefaultSvgExportOptions(context, - transform: transform), + + setState(() { + _preset = ExportTransformPreset.view; + _options = (switch (_options) { + ImageExportOptions _ => getDefaultImageExportOptions( + context, + transform: transform), + SvgExportOptions _ => getDefaultSvgExportOptions( + context, + transform: transform), + }); }); - setState(() => _preset = ExportTransformPreset.view); _regeneratePreviewImage(); }, icon: const PhosphorIcon(PhosphorIconsLight.userRectangle), @@ -272,22 +249,24 @@ class _GeneralExportDialogState extends State { context.read().state.currentIndexCubit; if (cubit == null) return; final rect = cubit.getPageRect(); - _applyOptions(switch (_options) { - ImageExportOptions e => e.copyWith( - width: rect.width, - height: rect.height, - x: rect.left, - y: rect.top, - scale: 1, - ), - SvgExportOptions e => e.copyWith( - width: rect.width, - height: rect.height, - x: rect.left, - y: rect.top, - ), + setState(() { + _preset = ExportTransformPreset.page; + _options = (switch (_options) { + ImageExportOptions e => e.copyWith( + width: rect.width, + height: rect.height, + x: rect.left, + y: rect.top, + scale: 1, + ), + SvgExportOptions e => e.copyWith( + width: rect.width, + height: rect.height, + x: rect.left, + y: rect.top, + ), + }); }); - setState(() => _preset = ExportTransformPreset.page); _regeneratePreviewImage(); }, icon: const PhosphorIcon(PhosphorIconsLight.file), @@ -328,76 +307,30 @@ class _GeneralExportDialogState extends State { Widget _buildProperties() => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - AppLocalizations.of(context).position, - style: Theme.of(context).textTheme.titleMedium, - ), - Row( - children: [ - Expanded( - child: TextField( - controller: _xController, - decoration: const InputDecoration(labelText: 'X', filled: true), - onChanged: (value) { - _options = _options.copyWith( - x: double.tryParse(value) ?? _options.x); - setState(() => _preset = null); - }, - onSubmitted: (value) => _regeneratePreviewImage(), - ), - ), - const SizedBox(width: 16), - Expanded( - child: TextField( - controller: _yController, - decoration: const InputDecoration(labelText: 'Y', filled: true), - onChanged: (value) { - _options = _options.copyWith( - y: double.tryParse(value) ?? _options.y); - setState(() => _preset = null); - }, - onSubmitted: (value) => _regeneratePreviewImage(), - ), - ), - ], - ), - const SizedBox(height: 16), - Text( - AppLocalizations.of(context).size, - style: Theme.of(context).textTheme.titleMedium, + OffsetListTile( + value: Offset(_options.x, _options.y), + title: Text(AppLocalizations.of(context).position), + onChanged: (value) { + setState( + () => _options = _options.copyWith(x: value.dx, y: value.dy)); + setState(() => _preset = null); + _regeneratePreviewImage(); + }, ), - Row( - children: [ - Expanded( - child: TextField( - controller: _widthController, - decoration: InputDecoration( - labelText: AppLocalizations.of(context).width, - filled: true), - onChanged: (value) { - _options = _options.copyWith( - width: double.tryParse(value) ?? _options.width); - setState(() => _preset = null); - }, - onSubmitted: (value) => _regeneratePreviewImage(), - ), - ), - const SizedBox(width: 16), - Expanded( - child: TextField( - controller: _heightController, - decoration: InputDecoration( - labelText: AppLocalizations.of(context).height, - filled: true), - onChanged: (value) { - _options = _options.copyWith( - height: double.tryParse(value) ?? _options.height); - setState(() => _preset = null); - }, - onSubmitted: (value) => _regeneratePreviewImage(), - ), - ), - ], + const SizedBox(height: 8), + OffsetListTile( + value: Offset(_options.width, _options.height), + title: Text(AppLocalizations.of(context).size), + xLabel: AppLocalizations.of(context).width, + yLabel: AppLocalizations.of(context).height, + onChanged: (value) { + setState(() => _options = _options.copyWith( + width: value.dx, + height: value.dy, + )); + setState(() => _preset = null); + _regeneratePreviewImage(); + }, ), if (_options is ImageExportOptions) ..._getImageOptions(_options as ImageExportOptions), @@ -415,7 +348,6 @@ class _GeneralExportDialogState extends State { List _getImageOptions(ImageExportOptions options) { return [ - const SizedBox(height: 8), ExactSlider( header: Text(AppLocalizations.of(context).scale), min: 0.1, diff --git a/app/lib/dialogs/export/pdf.dart b/app/lib/dialogs/export/pdf.dart index 145198e90dfe..54482fbe3bd5 100644 --- a/app/lib/dialogs/export/pdf.dart +++ b/app/lib/dialogs/export/pdf.dart @@ -377,7 +377,6 @@ class _AreaPreview extends StatelessWidget { const SizedBox(height: 8), Text(area.name), Text(page, style: Theme.of(context).textTheme.bodySmall), - const SizedBox(height: 16), ExactSlider( value: quality, min: 1, diff --git a/app/lib/dialogs/packs/styles/text.dart b/app/lib/dialogs/packs/styles/text.dart index 5ea356a589fa..b06647b618b3 100644 --- a/app/lib/dialogs/packs/styles/text.dart +++ b/app/lib/dialogs/packs/styles/text.dart @@ -108,7 +108,6 @@ class _TextStyleViewState extends State { onChangeEnd: (spacing) => widget.onChanged( widget.value.copyWith(letterSpacing: spacing), )), - const SizedBox(height: 16), ListTile( title: Text(AppLocalizations.of(context).fontWeight), trailing: DropdownMenu( @@ -212,33 +211,30 @@ class _TextStyleViewState extends State { defaultColor: null, onChanged: (color) => widget.onChanged( widget.value.copyWith(decorationColor: color))), - Padding( - padding: const EdgeInsets.all(16.0), - child: ExactSlider( - header: - Text(AppLocalizations.of(context).thickness), - defaultValue: 1, - value: widget.value.decorationThickness, - bottom: widget.value.decorationThickness == null - ? Text(AppLocalizations.of(context).notSet) - : null, - leading: widget.value.decorationThickness == null - ? null - : IconButton( - icon: const PhosphorIcon( - PhosphorIconsLight.eraser), - tooltip: - AppLocalizations.of(context).remove, - onPressed: () => widget.onChanged(widget - .value - .copyWith(decorationThickness: null)), - ), - min: 0.1, - max: 4, - onChangeEnd: (thickness) => widget.onChanged( - widget.value.copyWith( - decorationThickness: thickness))), - ), + ExactSlider( + header: + Text(AppLocalizations.of(context).thickness), + defaultValue: 1, + value: widget.value.decorationThickness, + bottom: widget.value.decorationThickness == null + ? Text(AppLocalizations.of(context).notSet) + : null, + leading: widget.value.decorationThickness == null + ? null + : IconButton( + icon: const PhosphorIcon( + PhosphorIconsLight.eraser), + tooltip: + AppLocalizations.of(context).remove, + onPressed: () => widget.onChanged(widget + .value + .copyWith(decorationThickness: null)), + ), + min: 0.1, + max: 4, + onChangeEnd: (thickness) => widget.onChanged(widget + .value + .copyWith(decorationThickness: thickness))), ])) ], )), diff --git a/app/lib/dialogs/texture.dart b/app/lib/dialogs/texture.dart index a8201ace56fb..555a8927da96 100644 --- a/app/lib/dialogs/texture.dart +++ b/app/lib/dialogs/texture.dart @@ -62,46 +62,38 @@ class _TextureViewState extends State { onChanged: (value) => widget.onChanged(widget.value.copyWith(boxXColor: value)), ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged(widget.value.copyWith(boxWidth: value)), - header: Text(AppLocalizations.of(context).width, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).width), value: widget.value.boxWidth, defaultValue: 0, min: 0, max: 500, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged( widget.value.copyWith(boxXCount: value.round())), - header: Text(AppLocalizations.of(context).count, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).count), value: widget.value.boxXCount.toDouble(), fractionDigits: 0, defaultValue: 0, min: 0, max: 20, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged(widget.value.copyWith(boxXSpace: value)), - header: Text(AppLocalizations.of(context).space, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).space), value: widget.value.boxXSpace, defaultValue: 0, min: 0, max: 500, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget .onChanged(widget.value.copyWith(boxXStroke: value)), - header: Text(AppLocalizations.of(context).strokeWidth, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).strokeWidth), value: widget.value.boxXStroke, defaultValue: 0.5, min: 0.1, @@ -115,46 +107,38 @@ class _TextureViewState extends State { onChanged: (value) => widget.onChanged(widget.value.copyWith(boxYColor: value)), ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged(widget.value.copyWith(boxHeight: value)), - header: Text(AppLocalizations.of(context).width, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).width), value: widget.value.boxHeight, defaultValue: 0, min: 0, max: 500, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged( widget.value.copyWith(boxYCount: value.round())), - header: Text(AppLocalizations.of(context).count, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).count), value: widget.value.boxYCount.toDouble(), defaultValue: 0, fractionDigits: 0, min: 0, max: 20, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget.onChanged(widget.value.copyWith(boxYSpace: value)), - header: Text(AppLocalizations.of(context).space, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).space), value: widget.value.boxYSpace, defaultValue: 0, min: 0, max: 500, ), - const SizedBox(height: 16), ExactSlider( onChanged: (value) => widget .onChanged(widget.value.copyWith(boxYStroke: value)), - header: Text(AppLocalizations.of(context).strokeWidth, - style: Theme.of(context).textTheme.titleLarge), + header: Text(AppLocalizations.of(context).strokeWidth), value: widget.value.boxYStroke, defaultValue: 0.5, min: 0.1, diff --git a/app/lib/selections/document.dart b/app/lib/selections/document.dart index 500815cf6462..0931d6d38292 100644 --- a/app/lib/selections/document.dart +++ b/app/lib/selections/document.dart @@ -333,14 +333,12 @@ class _UtilitiesViewState extends State<_UtilitiesView> ), Column( children: [ - OffsetPropertyView( + OffsetListTile( title: Text(AppLocalizations.of(context).position), value: context.read().state.position, - round: 2, onChanged: (value) => context.read().teleport(value), ), - const SizedBox(height: 8), ExactSlider( header: Text(AppLocalizations.of(context).zoom), value: context.read().state.size * 100, @@ -358,7 +356,6 @@ class _UtilitiesViewState extends State<_UtilitiesView> context.read().bake(); }, ), - const SizedBox(height: 8), CheckboxListTile( value: widget.state.fullSelection, onChanged: (value) => widget.onStateChanged( diff --git a/app/lib/selections/elements/element.dart b/app/lib/selections/elements/element.dart index f6917c3638ec..e3b78f880cb3 100644 --- a/app/lib/selections/elements/element.dart +++ b/app/lib/selections/elements/element.dart @@ -32,13 +32,14 @@ class ElementSelection extends Selection> { @override List buildProperties(BuildContext context) { - final position = selected.length > 1 ? null : selected.first.rect?.topLeft; + final position = selected.fold( + Offset.zero, (p, e) => p + (e.rect?.topLeft ?? Offset.zero)) / + selected.length.toDouble(); return [ ...super.buildProperties(context), - OffsetPropertyView( + OffsetListTile( value: position, title: Text(AppLocalizations.of(context).position), - clearValue: selected.length > 1, onChanged: (value) { updateElements( context, @@ -164,123 +165,3 @@ class ElementSelection extends Selection> { @override IconGetter get icon => PhosphorIcons.cube; } - -class OffsetPropertyView extends StatefulWidget { - final Widget title; - final Offset? value; - final bool clearValue; - final Function(Offset) onChanged; - final int round; - - const OffsetPropertyView( - {super.key, - required this.title, - this.clearValue = false, - this.value, - this.round = 4, - required this.onChanged}); - - @override - State createState() => _OffsetPropertyViewState(); -} - -class _OffsetPropertyViewState extends State { - late final TextEditingController _xController; - late final TextEditingController _yController; - - @override - void initState() { - super.initState(); - _xController = TextEditingController( - text: widget.value?.dx.toPrecision(widget.round).toString() ?? ''); - _yController = TextEditingController( - text: widget.value?.dy.toPrecision(widget.round).toString() ?? ''); - } - - @override - void dispose() { - super.dispose(); - - _xController.dispose(); - _yController.dispose(); - } - - @override - Widget build(BuildContext context) { - return LayoutBuilder(builder: (context, constrained) { - final isRow = constrained.maxWidth > 100; - final title = DefaultTextStyle( - style: Theme.of(context).textTheme.titleMedium ?? const TextStyle(), - child: widget.title); - final controls = Row(mainAxisAlignment: MainAxisAlignment.end, children: [ - Expanded( - child: TextFormField( - controller: _xController, - decoration: const InputDecoration( - labelText: 'X', - alignLabelWithHint: true, - floatingLabelAlignment: FloatingLabelAlignment.center, - filled: true, - ), - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - onFieldSubmitted: (value) { - if (value.isEmpty) return; - final dx = double.tryParse(value); - if (dx == null) return; - if (widget.clearValue) { - _xController.text = ''; - _yController.text = ''; - } - widget.onChanged(Offset(dx, widget.value?.dy ?? 0)); - }, - ), - ), - const SizedBox(width: 8), - Expanded( - child: TextFormField( - controller: _yController, - decoration: const InputDecoration( - labelText: 'Y', - alignLabelWithHint: true, - floatingLabelAlignment: FloatingLabelAlignment.center, - filled: true, - ), - textAlign: TextAlign.center, - keyboardType: TextInputType.number, - onFieldSubmitted: (value) { - if (value.isEmpty) return; - final dy = double.tryParse(value); - if (dy == null) return; - if (widget.clearValue) { - _xController.text = ''; - _yController.text = ''; - } - widget.onChanged(Offset(widget.value?.dx ?? 0, dy)); - }, - ), - ), - ]); - if (isRow) { - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Row( - children: [ - Expanded(flex: 1, child: title), - const SizedBox(width: 8), - Expanded(flex: 2, child: controls), - ], - ), - ); - } - return Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - title, - const SizedBox(height: 8), - controls, - ], - ); - }); - } -} diff --git a/app/lib/selections/elements/pen.dart b/app/lib/selections/elements/pen.dart index d01d550edd3f..3217d556ddad 100644 --- a/app/lib/selections/elements/pen.dart +++ b/app/lib/selections/elements/pen.dart @@ -12,7 +12,6 @@ class PenElementSelection extends ElementSelection { context, elements.map((e) => e.copyWith(property: property)).toList()); return [ ...super.buildProperties(context), - SizedBox(height: 16), ..._propertySelection.build( context, element.property, diff --git a/app/lib/selections/properties/pen.dart b/app/lib/selections/properties/pen.dart index 7b5a588b1a8f..872d9a3915ee 100644 --- a/app/lib/selections/properties/pen.dart +++ b/app/lib/selections/properties/pen.dart @@ -12,14 +12,12 @@ class PenPropertySelection extends PropertySelection ) => [ ...super.build(context, property, onChanged), - const SizedBox(height: 4), ColorField( value: property.color.withValues(a: 255), onChanged: (value) => onChanged( property.copyWith(color: value.withValues(a: property.color.a))), title: Text(LeapLocalizations.of(context).color), ), - const SizedBox(height: 4), ExactSlider( value: property.color.a.toDouble(), header: Text(AppLocalizations.of(context).alpha), @@ -30,7 +28,6 @@ class PenPropertySelection extends PropertySelection onChangeEnd: (value) => onChanged(property.copyWith( color: property.color.withValues(a: value.toInt()))), ), - const SizedBox(height: 4), CheckboxListTile( value: property.fill, title: Text(AppLocalizations.of(context).fill), diff --git a/app/lib/selections/tools/area.dart b/app/lib/selections/tools/area.dart index 4551e20bce08..f748f98fdf55 100644 --- a/app/lib/selections/tools/area.dart +++ b/app/lib/selections/tools/area.dart @@ -17,7 +17,6 @@ class AreaToolSelection extends ToolSelection { .map((e) => e.copyWith(askForName: value ?? false)) .toList()), ), - const SizedBox(height: 4), ExactSlider( header: Text(AppLocalizations.of(context).width), value: tool.constrainedWidth, diff --git a/app/lib/selections/tools/eraser.dart b/app/lib/selections/tools/eraser.dart index 0ad4a5c94950..512ce227ecab 100644 --- a/app/lib/selections/tools/eraser.dart +++ b/app/lib/selections/tools/eraser.dart @@ -16,7 +16,6 @@ class EraserToolSelection extends ToolSelection { onChangeEnd: (value) => update(context, selected.map((e) => e.copyWith(strokeWidth: value)).toList()), ), - const SizedBox(height: 4), CheckboxListTile( value: selected.first.eraseElements, title: Text(AppLocalizations.of(context).deleteElements), diff --git a/app/lib/selections/tools/grid.dart b/app/lib/selections/tools/grid.dart index d8e680cbdc01..00ac4e2925b7 100644 --- a/app/lib/selections/tools/grid.dart +++ b/app/lib/selections/tools/grid.dart @@ -7,8 +7,7 @@ class GridToolSelection extends ToolSelection { List buildProperties(BuildContext context) { return [ ...super.buildProperties(context), - const SizedBox(height: 8), - OffsetPropertyView( + OffsetListTile( title: Text(AppLocalizations.of(context).size), value: Offset(selected.first.xSize, selected.first.ySize), onChanged: (value) => update( @@ -18,8 +17,7 @@ class GridToolSelection extends ToolSelection { .toList(), ), ), - const SizedBox(height: 8), - OffsetPropertyView( + OffsetListTile( title: Text(AppLocalizations.of(context).offset), value: Offset(selected.first.xOffset, selected.first.yOffset), onChanged: (value) => update( diff --git a/app/lib/selections/tools/laser.dart b/app/lib/selections/tools/laser.dart index 3d1390725bc6..bed9d2d63e72 100644 --- a/app/lib/selections/tools/laser.dart +++ b/app/lib/selections/tools/laser.dart @@ -29,7 +29,6 @@ class LaserToolSelection extends ToolSelection { selected.map((e) => e.copyWith(thinning: value)).toList(), ), ), - const SizedBox(height: 4), ColorField( value: selected.first.color, onChanged: (value) => update( @@ -89,7 +88,6 @@ class LaserToolSelection extends ToolSelection { }, ), ), - const SizedBox(height: 15), ]; } diff --git a/app/lib/selections/tools/path_eraser.dart b/app/lib/selections/tools/path_eraser.dart index 5fe01cc7ee5b..bca7cd6693ed 100644 --- a/app/lib/selections/tools/path_eraser.dart +++ b/app/lib/selections/tools/path_eraser.dart @@ -16,7 +16,6 @@ class PathEraserToolSelection extends ToolSelection { defaultValue: 5, onChangeEnd: (value) => update(context, selected.map((e) => e.copyWith(strokeWidth: value)).toList())), - const SizedBox(height: 4), CheckboxListTile( value: selected.first.eraseElements, title: Text(AppLocalizations.of(context).deleteElements), diff --git a/app/lib/selections/tools/shape.dart b/app/lib/selections/tools/shape.dart index e86fd69b8bfb..f9140e4b1da1 100644 --- a/app/lib/selections/tools/shape.dart +++ b/app/lib/selections/tools/shape.dart @@ -81,7 +81,6 @@ class ShapeToolSelection extends ToolSelection { .map((e) => e.copyWith( property: e.property.copyWith(strokeWidth: value))) .toList())), - const SizedBox(height: 50), ColorField( value: property.color.withValues(a: 255), onChanged: (color) => update( diff --git a/app/lib/settings/behaviors.dart b/app/lib/settings/behaviors.dart index b19a7a49ac5b..2477d81f98af 100644 --- a/app/lib/settings/behaviors.dart +++ b/app/lib/settings/behaviors.dart @@ -116,7 +116,6 @@ class BehaviorsSettingsPage extends StatelessWidget { .read() .changeSpreadPages(value), ), - const SizedBox(height: 8), ExactSlider( header: Text(AppLocalizations.of(context).imageScale), leading: diff --git a/app/pubspec.lock b/app/pubspec.lock index 06e20cfd4a65..5ad7bbb943a1 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -841,8 +841,8 @@ packages: dependency: "direct main" description: path: "packages/material_leap" - ref: "54f7ac141410938babff9539dca190f5d130a0db" - resolved-ref: "54f7ac141410938babff9539dca190f5d130a0db" + ref: "61131718fe2f6e9f09da75e9e9cdbe4acdf79f00" + resolved-ref: "61131718fe2f6e9f09da75e9e9cdbe4acdf79f00" url: "https://github.com/LinwoodDev/dart_pkgs" source: git version: "0.0.1" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index b6fbfbd1abc4..e7ba7e4424b5 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -79,7 +79,7 @@ dependencies: material_leap: git: url: https://github.com/LinwoodDev/dart_pkgs - ref: 54f7ac141410938babff9539dca190f5d130a0db + ref: 61131718fe2f6e9f09da75e9e9cdbe4acdf79f00 path: packages/material_leap lw_sysapi: git: diff --git a/metadata/en-US/changelogs/127.txt b/metadata/en-US/changelogs/127.txt index 3f44711052a3..07bc3375ebf4 100644 --- a/metadata/en-US/changelogs/127.txt +++ b/metadata/en-US/changelogs/127.txt @@ -14,11 +14,13 @@ * Add password protected notes ([#771](https://github.com/LinwoodDev/Butterfly/issues/771)) * Add option to import svg as text ([#596](https://github.com/LinwoodDev/Butterfly/issues/596)) * Improve grid files view +* Improve slider and double input list tiles * Change aspect ratio to use 3 fraction digits for area * Fix undo/redo tools not showing status correctly * Fix grid not working correctly * Fix capture thumbnail uses wrong position * Fix zoom slider is not centered * Fix shape detection list tile not clickable +* Fix svg export shows wrong initial preset Read more here: https://linwood.dev/butterfly/2.3.0-beta.0 \ No newline at end of file