Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Use HugeIcons for AppBar menu, search, and lock icons

Prateek Sunala7dab64beba2
diff --git a/mobile/apps/auth/assets/svg/filter-icon.svg b/mobile/apps/auth/assets/svg/filter-icon.svg
index a4ba767097..e2e5e2896c 100644
--- a/mobile/apps/auth/assets/svg/filter-icon.svg
+++ b/mobile/apps/auth/assets/svg/filter-icon.svg
@@ -1,5 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.5 7H19.5" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M7 12H17" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.5 17H14.5" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.5 7H19.5" stroke="white" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M7 12H17" stroke="white" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.5 17H14.5" stroke="white" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
diff --git a/mobile/apps/auth/assets/svg/menu-icon.svg b/mobile/apps/auth/assets/svg/menu-icon.svg
deleted file mode 100644
index c0f3612724..0000000000
--- a/mobile/apps/auth/assets/svg/menu-icon.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M5.33203 6.16602H18.6654" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M5.33203 12H18.6654" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M5.33203 17.834H18.6654" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
diff --git a/mobile/apps/auth/assets/svg/search-icon.svg b/mobile/apps/auth/assets/svg/search-icon.svg
deleted file mode 100644
index a2761913de..0000000000
--- a/mobile/apps/auth/assets/svg/search-icon.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M16.168 16.166L19.5013 19.4993" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M17.8333 11.1667C17.8333 7.48477 14.8486 4.5 11.1667 4.5C7.48477 4.5 4.5 7.48477 4.5 11.1667C4.5 14.8486 7.48477 17.8333 11.1667 17.8333C14.8486 17.8333 17.8333 14.8486 17.8333 11.1667Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dart
index 2a403bc94f..7fa510f591 100644
--- a/mobile/apps/auth/lib/ui/home_page.dart
+++ b/mobile/apps/auth/lib/ui/home_page.dart
@@ -56,7 +56,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
-import 'package:flutter_svg/flutter_svg.dart';
import 'package:hugeicons/hugeicons.dart';
import 'package:logging/logging.dart';
import 'package:move_to_background/move_to_background.dart';
@@ -1365,11 +1364,11 @@ class _HomePageState extends State<HomePage> {
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
surfaceTintColor: Colors.transparent,
leading: IconButton(
- icon: SvgPicture.asset(
- 'assets/svg/menu-icon.svg',
- width: 24,
- height: 24,
- colorFilter: ColorFilter.mode(iconColor, BlendMode.srcIn),
+ icon: HugeIcon(
+ icon: HugeIcons.strokeRoundedMenu01,
+ color: iconColor,
+ size: 22,
+ strokeWidth: 1.75,
),
tooltip: l10n.settings,
onPressed: () {
@@ -1396,6 +1395,20 @@ class _HomePageState extends State<HomePage> {
),
centerTitle: true,
actions: <Widget>[
+ if (isDesktop)
+ IconButton(
+ icon: HugeIcon(
+ icon: HugeIcons.strokeRoundedSquareLock02,
+ color: iconColor,
+ size: 22,
+ strokeWidth: 1.75,
+ ),
+ tooltip: l10n.appLock,
+ padding: const EdgeInsets.all(8.0),
+ onPressed: () async {
+ await navigateToLockScreen();
+ },
+ ),
Padding(
padding: const EdgeInsets.all(8.0),
child: SortCodeMenuWidget(
@@ -1415,23 +1428,14 @@ class _HomePageState extends State<HomePage> {
iconColor: iconColor,
),
),
- if (isDesktop)
- IconButton(
- icon: const Icon(Icons.lock),
- tooltip: l10n.appLock,
- padding: const EdgeInsets.all(8.0),
- onPressed: () async {
- await navigateToLockScreen();
- },
- ),
IconButton(
icon: _showSearchBox
- ? Icon(Icons.clear, color: iconColor)
- : SvgPicture.asset(
- 'assets/svg/search-icon.svg',
- width: 24,
- height: 24,
- colorFilter: ColorFilter.mode(iconColor, BlendMode.srcIn),
+ ? Icon(Icons.clear, color: iconColor, size: 22)
+ : HugeIcon(
+ icon: HugeIcons.strokeRoundedSearch01,
+ color: iconColor,
+ size: 22,
+ strokeWidth: 1.75,
),
tooltip: l10n.search,
padding: const EdgeInsets.all(8.0),
diff --git a/mobile/apps/auth/lib/ui/sort_option_menu.dart b/mobile/apps/auth/lib/ui/sort_option_menu.dart
index d2f938176d..f1e29c21c4 100644
--- a/mobile/apps/auth/lib/ui/sort_option_menu.dart
+++ b/mobile/apps/auth/lib/ui/sort_option_menu.dart
@@ -77,11 +77,12 @@ class SortCodeMenuWidget extends StatelessWidget {
},
child: SvgPicture.asset(
'assets/svg/filter-icon.svg',
- width: 24,
- height: 24,
- colorFilter: iconColor != null
- ? ColorFilter.mode(iconColor!, BlendMode.srcIn)
- : null,
+ width: 26,
+ height: 26,
+ colorFilter: ColorFilter.mode(
+ iconColor ?? Theme.of(context).iconTheme.color!,
+ BlendMode.srcIn,
+ ),
),
);
}