Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][locker] Make scanner button more prominent

laurenspriemab3a64acb35c
diff --git a/mobile/apps/locker/changes/scanner-button-visibility.md b/mobile/apps/locker/changes/scanner-button-visibility.md
new file mode 100644
index 0000000000..4a12b9dfe5
--- /dev/null
+++ b/mobile/apps/locker/changes/scanner-button-visibility.md
@@ -0,0 +1 @@
+- Made the document scanner button more prominent with a blue border.
diff --git a/mobile/apps/locker/lib/ui/pages/home_page.dart b/mobile/apps/locker/lib/ui/pages/home_page.dart
index 1f04402e95..76b79d60ad 100644
--- a/mobile/apps/locker/lib/ui/pages/home_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/home_page.dart
@@ -864,7 +864,7 @@ class _HomePageState extends UploaderPageState<HomePage>
button: true,
label: context.strings.scanDocumentTitle,
child: FABComponent(
- variant: FABComponentVariant.secondary,
+ variant: FABComponentVariant.outlined,
icon: HugeIcon(
icon: HugeIcons.strokeRoundedCamera01,
color: colors.primary,
diff --git a/mobile/packages/ente_components/lib/components/buttons/fab_component.dart b/mobile/packages/ente_components/lib/components/buttons/fab_component.dart
index c58d1f90bc..c342afb222 100644
--- a/mobile/packages/ente_components/lib/components/buttons/fab_component.dart
+++ b/mobile/packages/ente_components/lib/components/buttons/fab_component.dart
@@ -5,7 +5,7 @@ import "package:ente_components/theme/text_styles.dart";
import "package:ente_components/theme/theme.dart";
import "package:flutter/material.dart";
-enum FABComponentVariant { primary, secondary, destructive }
+enum FABComponentVariant { primary, secondary, outlined, destructive }
// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=21843-6537&m=dev
class FABComponent extends StatefulWidget {
@@ -57,13 +57,16 @@ class _FABComponentState extends State<FABComponent> {
_isPressed ? colors.primaryDark : colors.primary,
FABComponentVariant.secondary =>
_isPressed ? colors.fillDarker : colors.fillDark,
+ FABComponentVariant.outlined =>
+ _isPressed ? colors.primaryLightPressed : colors.primaryLight,
FABComponentVariant.destructive =>
_isPressed ? colors.warningDark : colors.warning,
};
final foregroundColor = switch (widget.variant) {
FABComponentVariant.primary ||
FABComponentVariant.destructive => colors.specialWhite,
- FABComponentVariant.secondary => colors.primary,
+ FABComponentVariant.secondary ||
+ FABComponentVariant.outlined => colors.primary,
};
return GestureDetector(
behavior: HitTestBehavior.opaque,
@@ -82,6 +85,12 @@ class _FABComponentState extends State<FABComponent> {
color: backgroundColor,
borderRadius: BorderRadius.circular(9999),
),
+ foregroundDecoration: widget.variant == FABComponentVariant.outlined
+ ? BoxDecoration(
+ border: Border.all(color: colors.primaryDark, width: 1),
+ borderRadius: BorderRadius.circular(9999),
+ )
+ : null,
child: ConstrainedBox(
constraints: const BoxConstraints(minWidth: 52, minHeight: 52),
child: Padding(