Minor UI improvements
This commit is contained in:
35
mobile/apps/locker/lib/ui/components/menu_section_title.dart
Normal file
35
mobile/apps/locker/lib/ui/components/menu_section_title.dart
Normal file
@@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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: ''),
|
||||
|
||||
Reference in New Issue
Block a user