From e5ca54f7f2119b0ea62499ab5cd38a980363ba5e Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 19 Dec 2024 12:19:46 -0500 Subject: [PATCH] Fix ConfigItem font size (#210) * Make other thing bigger * Fix other padding * Clean up textStyle --- lib/components/config/ConfigItem.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/components/config/ConfigItem.dart b/lib/components/config/ConfigItem.dart index 16a1ebd..941ea71 100644 --- a/lib/components/config/ConfigItem.dart +++ b/lib/components/config/ConfigItem.dart @@ -20,20 +20,22 @@ class ConfigItem extends StatelessWidget { @override Widget build(BuildContext context) { + var textStyle; + if (Platform.isAndroid) { + textStyle = Theme.of(context).textTheme.labelLarge!.copyWith(fontWeight: FontWeight.normal); + } else { + textStyle = CupertinoTheme.of(context).textTheme.textStyle; + } + return Container( color: Utils.configItemBackground(context), - padding: EdgeInsets.only(top: 2, bottom: 2, left: 15, right: 10), + padding: EdgeInsets.only(top: 2, bottom: 2, left: 15, right: 20), constraints: BoxConstraints(minHeight: Utils.minInteractiveSize), child: Row( crossAxisAlignment: crossAxisAlignment, children: [ - Container( - width: labelWidth, - child: Platform.isAndroid - ? label - : DefaultTextStyle( - style: CupertinoTheme.of(context).textTheme.textStyle, child: Container(child: label))), - Expanded(child: content), + Container(width: labelWidth, child: DefaultTextStyle(style: textStyle, child: Container(child: label))), + Expanded(child: DefaultTextStyle(style: textStyle, child: Container(child: content))), ], )); }