π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add SVG delete icon and update image editor UI to use it
AmanRajSinghMouryaed7cc5f8c19a
diff --git a/mobile/apps/photos/assets/image-editor/image-editor-delete.svg b/mobile/apps/photos/assets/image-editor/image-editor-delete.svgnew file mode 100644index 0000000000..392fc4cb52--- /dev/null+++ b/mobile/apps/photos/assets/image-editor/image-editor-delete.svg@@ -0,0 +1,6 @@+<svg width="29" height="31" viewBox="0 0 29 31" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M23 9.125L22.2977 20.4868C22.1182 23.3896 22.0285 24.841 21.3009 25.8846C20.9411 26.4005 20.478 26.8359 19.9408 27.1631C18.8544 27.825 17.4002 27.825 14.4917 27.825C11.5795 27.825 10.1234 27.825 9.03626 27.1619C8.49877 26.8341 8.03547 26.3979 7.67584 25.8811C6.94846 24.8359 6.86071 23.3824 6.68522 20.4756L6 9.125" stroke="#FF3A2C" stroke-width="1.7" stroke-linecap="round"/>+<path d="M4.29688 4.99792H24.6969M19.0933 4.99792L18.3197 3.40188C17.8058 2.34168 17.5487 1.81157 17.1055 1.48097C17.0072 1.40763 16.9031 1.3424 16.7941 1.28591C16.3033 1.03125 15.7142 1.03125 14.536 1.03125C13.3282 1.03125 12.7243 1.03125 12.2253 1.29659C12.1147 1.35539 12.0092 1.42327 11.9098 1.49951C11.4614 1.84351 11.2109 2.39301 10.71 3.49201L10.0235 4.99792" stroke="#FF3A2C" stroke-width="1.7" stroke-linecap="round"/>+<path d="M11.6719 21.5969V14.7969" stroke="#FF3A2C" stroke-width="1.7" stroke-linecap="round"/>+<path d="M17.3281 21.5969V14.7969" stroke="#FF3A2C" stroke-width="1.7" stroke-linecap="round"/>+</svg>diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page_new.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page_new.dartindex 13ff58e07a..771ac502a9 100644--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page_new.dart+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page_new.dart@@ -6,6 +6,7 @@ import 'dart:ui' as ui show Image;import 'package:flutter/material.dart';import "package:flutter_image_compress/flutter_image_compress.dart";+import "package:flutter_svg/svg.dart";import "package:google_fonts/google_fonts.dart";import "package:logging/logging.dart";import 'package:path/path.dart' as path;@@ -202,6 +203,11 @@ class _NewImageEditorState extends State<NewImageEditor> {),),configs: ProImageEditorConfigs(+ imageGeneration: const ImageGenerationConfigs(+ jpegQuality: 100,+ generateInsideSeparateThread: true,+ pngLevel: 0,+ ),layerInteraction: const LayerInteractionConfigs(hideToolbarOnInteraction: false,),@@ -241,16 +247,20 @@ class _NewImageEditorState extends State<NewImageEditor> {margin: const EdgeInsets.only(bottom: 24),decoration: BoxDecoration(color: isHovered- ? const Color.fromARGB(255, 255, 197, 197)- : const Color.fromARGB(255, 255, 255, 255),+ ? colorScheme.warning400.withOpacity(0.8)+ : Colors.white,shape: BoxShape.circle,),padding: const EdgeInsets.all(12),- child: const Center(- child: Icon(- Icons.delete_forever_outlined,- size: 28,- color: Color(0xFFF44336),+ child: Center(+ child: SvgPicture.asset(+ "assets/image-editor/image-editor-delete.svg",+ colorFilter: ColorFilter.mode(+ isHovered+ ? Colors.white+ : colorScheme.warning400.withOpacity(0.8),+ BlendMode.srcIn,+ ),),),);@@ -351,7 +361,34 @@ class _NewImageEditorState extends State<NewImageEditor> {textFieldMargin: EdgeInsets.only(top: kToolbarHeight),),widgets: TextEditorWidgets(- appBar: (textEditor, rebuildStream) => null,+ appBar: (textEditor, rebuildStream) => ReactiveCustomAppbar(+ builder: (context) {+ return ImageEditorAppBar(+ key: const Key('image_editor_app_bar'),+ configs: textEditor.configs,+ done: () => textEditor.done(),+ close: () => textEditor.close(),+ );+ },+ stream: rebuildStream,+ ),+ bodyItems: (editor, rebuildStream) {+ return [+ ReactiveCustomWidget(+ builder: (context) {+ return Positioned.fill(+ child: GestureDetector(+ onTap: () {},+ child: Container(+ color: Colors.transparent,+ ),+ ),+ );+ },+ stream: rebuildStream,+ ),+ ];+ },colorPicker:(textEditor, rebuildStream, currentColor, setColor) => null,bottomBar: (editorState, rebuildStream) {