From 62cb67f3bf7ba101c46bb8088c6c2966ac481b2e Mon Sep 17 00:00:00 2001 From: AmanRajSinghMourya Date: Mon, 25 Aug 2025 11:47:11 +0530 Subject: [PATCH] Minor UI improvements --- .../lib/ui/components/menu_section_title.dart | 35 +++++++++++++++++++ .../lib/components/captioned_text_widget.dart | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 mobile/apps/locker/lib/ui/components/menu_section_title.dart diff --git a/mobile/apps/locker/lib/ui/components/menu_section_title.dart b/mobile/apps/locker/lib/ui/components/menu_section_title.dart new file mode 100644 index 0000000000..6f6ff1019e --- /dev/null +++ b/mobile/apps/locker/lib/ui/components/menu_section_title.dart @@ -0,0 +1,35 @@ +import "package:ente_ui/theme/ente_theme.dart"; +import 'package:flutter/widgets.dart'; + +class MenuSectionTitle extends StatelessWidget { + final String title; + final IconData? iconData; + + const MenuSectionTitle({super.key, required this.title, this.iconData}); + + @override + Widget build(BuildContext context) { + final colorScheme = getEnteColorScheme(context); + return Padding( + padding: const EdgeInsets.only(left: 8, top: 6, bottom: 6), + child: Row( + children: [ + iconData != null + ? Icon( + iconData, + color: colorScheme.strokeMuted, + size: 17, + ) + : const SizedBox.shrink(), + iconData != null ? const SizedBox(width: 8) : const SizedBox.shrink(), + Text( + title, + style: getEnteTextTheme(context).small.copyWith( + color: colorScheme.textMuted, + ), + ), + ], + ), + ); + } +} diff --git a/mobile/packages/ui/lib/components/captioned_text_widget.dart b/mobile/packages/ui/lib/components/captioned_text_widget.dart index bc9a9708d3..c7aecf080a 100644 --- a/mobile/packages/ui/lib/components/captioned_text_widget.dart +++ b/mobile/packages/ui/lib/components/captioned_text_widget.dart @@ -7,12 +7,14 @@ class CaptionedTextWidget extends StatelessWidget { final TextStyle? textStyle; final bool makeTextBold; final Color? textColor; + final Color? subTitleColor; const CaptionedTextWidget({ required this.title, this.subTitle, this.textStyle, this.makeTextBold = false, this.textColor, + this.subTitleColor, super.key, }); @@ -41,7 +43,7 @@ class CaptionedTextWidget extends StatelessWidget { ? TextSpan( text: ' \u2022 $subTitle', style: enteTextTheme.small.copyWith( - color: enteColorScheme.textMuted, + color: subTitleColor ?? enteColorScheme.textMuted, ), ) : const TextSpan(text: ''),