Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] UI finness on enalbe ML banner

ashilkn971dbc069c8b
diff --git a/mobile/lib/ui/components/notification_widget.dart b/mobile/lib/ui/components/notification_widget.dart
index 430b8a247b..2a8e18c712 100644
--- a/mobile/lib/ui/components/notification_widget.dart
+++ b/mobile/lib/ui/components/notification_widget.dart
@@ -23,6 +23,7 @@ class NotificationWidget extends StatelessWidget {
final GestureTapCallback onTap;
final NotificationType type;
final bool isBlackFriday;
+ final TextStyle? mainTextStyle;
const NotificationWidget({
super.key,
@@ -30,6 +31,7 @@ class NotificationWidget extends StatelessWidget {
required this.actionIcon,
required this.text,
required this.onTap,
+ this.mainTextStyle,
this.isBlackFriday = false,
this.subText,
this.type = NotificationType.warning,
@@ -39,7 +41,7 @@ class NotificationWidget extends StatelessWidget {
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
EnteTextTheme textTheme = getEnteTextTheme(context);
- TextStyle mainTextStyle = darkTextTheme.bodyBold;
+ TextStyle _mainTextStyle = mainTextStyle ?? darkTextTheme.bodyBold;
TextStyle subTextStyle = darkTextTheme.miniMuted;
LinearGradient? backgroundGradient;
Color? backgroundColor;
@@ -52,7 +54,7 @@ class NotificationWidget extends StatelessWidget {
case NotificationType.banner:
textTheme = getEnteTextTheme(context);
backgroundColor = colorScheme.backgroundElevated2;
- mainTextStyle = textTheme.bodyBold;
+ _mainTextStyle = textTheme.bodyBold;
subTextStyle = textTheme.miniMuted;
strokeColorScheme = colorScheme;
boxShadow = [
@@ -82,7 +84,7 @@ class NotificationWidget extends StatelessWidget {
break;
case NotificationType.notice:
backgroundColor = colorScheme.backgroundElevated2;
- mainTextStyle = textTheme.bodyBold;
+ _mainTextStyle = textTheme.bodyBold;
subTextStyle = textTheme.miniMuted;
strokeColorScheme = colorScheme;
boxShadow = Theme.of(context).colorScheme.enteTheme.shadowMenu;
@@ -140,7 +142,7 @@ class NotificationWidget extends StatelessWidget {
children: [
Text(
text,
- style: mainTextStyle,
+ style: _mainTextStyle,
textAlign: TextAlign.left,
),
subText != null
diff --git a/mobile/lib/ui/home/status_bar_widget.dart b/mobile/lib/ui/home/status_bar_widget.dart
index 391675b2b5..8b6fa9f7a0 100644
--- a/mobile/lib/ui/home/status_bar_widget.dart
+++ b/mobile/lib/ui/home/status_bar_widget.dart
@@ -120,16 +120,17 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
_showErrorBanner
? HeaderErrorWidget(error: _syncError)
: const SizedBox.shrink(),
- _showMlBanner && !_showErrorBanner
+ // _showMlBanner && !_showErrorBanner
+ true
? Padding(
padding:
const EdgeInsets.symmetric(horizontal: 2.0, vertical: 12),
child: NotificationWidget(
startIcon: Icons.offline_bolt,
actionIcon: Icons.arrow_forward,
- text:
- S.of(context).enableMachineLearningBanner,
+ text: S.of(context).enableMachineLearningBanner,
type: NotificationType.greenBanner,
+ mainTextStyle: darkTextTheme.smallMuted,
onTap: () async => {
await routeToPage(
context,