Fix ConfigItem font size (#210)

* Make other thing bigger

* Fix other padding

* Clean up textStyle
This commit is contained in:
Ian VanSchooten 2024-12-19 12:19:46 -05:00 committed by GitHub
parent db1f162f1e
commit e5ca54f7f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 8 deletions

View File

@ -20,20 +20,22 @@ class ConfigItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { 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( return Container(
color: Utils.configItemBackground(context), 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), constraints: BoxConstraints(minHeight: Utils.minInteractiveSize),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment, crossAxisAlignment: crossAxisAlignment,
children: <Widget>[ children: <Widget>[
Container( Container(width: labelWidth, child: DefaultTextStyle(style: textStyle, child: Container(child: label))),
width: labelWidth, Expanded(child: DefaultTextStyle(style: textStyle, child: Container(child: content))),
child: Platform.isAndroid
? label
: DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle, child: Container(child: label))),
Expanded(child: content),
], ],
)); ));
} }