From 63b4fc6f6582396918803555f34bcfce82a4ace8 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 19 Mar 2024 23:07:26 -0500 Subject: [PATCH] chore(mobile): svg logo (#8074) * chore(mobile): anti-aliasing logo * use svg * adjust height * better sizing --- mobile/assets/immich-logo-inline-dark.svg | 56 ++++++++++++++++++++++ mobile/assets/immich-logo-inline-light.svg | 54 +++++++++++++++++++++ mobile/ios/Podfile.lock | 2 +- mobile/lib/shared/ui/immich_app_bar.dart | 9 ++-- mobile/lib/shared/ui/immich_logo.dart | 1 + mobile/pubspec.lock | 40 ++++++++++++++++ mobile/pubspec.yaml | 1 + 7 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 mobile/assets/immich-logo-inline-dark.svg create mode 100644 mobile/assets/immich-logo-inline-light.svg diff --git a/mobile/assets/immich-logo-inline-dark.svg b/mobile/assets/immich-logo-inline-dark.svg new file mode 100644 index 0000000000..8d72e075ba --- /dev/null +++ b/mobile/assets/immich-logo-inline-dark.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/assets/immich-logo-inline-light.svg b/mobile/assets/immich-logo-inline-light.svg new file mode 100644 index 0000000000..d40a27a2bb --- /dev/null +++ b/mobile/assets/immich-logo-inline-light.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index 6081988b7a..a9ac5b3381 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -180,4 +180,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 64c9b5291666c0ca3caabdfe9865c141ac40321d -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1 diff --git a/mobile/lib/shared/ui/immich_app_bar.dart b/mobile/lib/shared/ui/immich_app_bar.dart index 5b26432d8f..678302dd99 100644 --- a/mobile/lib/shared/ui/immich_app_bar.dart +++ b/mobile/lib/shared/ui/immich_app_bar.dart @@ -1,6 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/shared/models/store.dart'; @@ -169,11 +170,11 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget { } return Padding( padding: const EdgeInsets.only(top: 3.0), - child: Image.asset( - height: 30, + child: SvgPicture.asset( context.isDarkTheme - ? 'assets/immich-logo-inline-dark.png' - : 'assets/immich-logo-inline-light.png', + ? 'assets/immich-logo-inline-dark.svg' + : 'assets/immich-logo-inline-light.svg', + height: 40, ), ); }, diff --git a/mobile/lib/shared/ui/immich_logo.dart b/mobile/lib/shared/ui/immich_logo.dart index af83887fbc..9f7725aa12 100644 --- a/mobile/lib/shared/ui/immich_logo.dart +++ b/mobile/lib/shared/ui/immich_logo.dart @@ -18,6 +18,7 @@ class ImmichLogo extends StatelessWidget { image: const AssetImage('assets/immich-logo.png'), width: size, filterQuality: FilterQuality.high, + isAntiAlias: true, ), ); } diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index f7a57bb2b3..2f35cf591a 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -560,6 +560,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.9" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + url: "https://pub.dev" + source: hosted + version: "2.0.9" flutter_test: dependency: "direct dev" description: flutter @@ -1006,6 +1014,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" + source: hosted + version: "1.0.1" path_provider: dependency: "direct main" description: @@ -1587,6 +1603,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752" + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33 + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a" + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" vector_math: dependency: transitive description: diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index ed8a4fad66..a566d1aa94 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -34,6 +34,7 @@ dependencies: ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5 geolocator: ^11.0.0 # used to move to current location in map view flutter_udid: ^3.0.0 + flutter_svg: ^2.0.9 package_info_plus: ^5.0.1 url_launcher: ^6.2.4 http: 0.13.5