Adapt ui to support text scale

This commit is contained in:
Juan Gilsanz Polo 2023-11-29 11:56:28 +01:00
parent bddfac7e72
commit c9c960d1ee
23 changed files with 624 additions and 495 deletions

View file

@ -8,10 +8,10 @@ class AddStaticLeaseModal extends StatefulWidget {
final bool dialog;
const AddStaticLeaseModal({
Key? key,
super.key,
required this.onConfirm,
required this.dialog
}) : super(key: key);
});
@override
State<AddStaticLeaseModal> createState() => _AddStaticLeaseModalState();
@ -80,26 +80,28 @@ class _AddStaticLeaseModalState extends State<AddStaticLeaseModal> {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 24),
child: Icon(
Icons.add,
size: 24,
color: Theme.of(context).listTileTheme.iconColor
Flexible(
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 24),
child: Icon(
Icons.add,
size: 24,
color: Theme.of(context).listTileTheme.iconColor
),
),
),
const SizedBox(height: 16),
Text(
AppLocalizations.of(context)!.addStaticLease,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
color: Theme.of(context).colorScheme.onSurface
const SizedBox(height: 16),
Text(
AppLocalizations.of(context)!.addStaticLease,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
color: Theme.of(context).colorScheme.onSurface
),
),
),
],
],
),
),
],
),

View file

@ -414,6 +414,7 @@ class _DhcpScreenState extends State<DhcpScreen> {
const SizedBox(height: 30),
Text(
AppLocalizations.of(context)!.loadingDhcp,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 22,
color: Theme.of(context).colorScheme.onSurfaceVariant,

View file

@ -8,10 +8,10 @@ class DhcpInterfaceItem extends StatelessWidget {
final void Function(NetworkInterface) onSelect;
const DhcpInterfaceItem({
Key? key,
super.key,
required this.networkInterface,
required this.onSelect
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -56,6 +56,7 @@ class DhcpInterfaceItem extends StatelessWidget {
const SizedBox(height: 5),
if (networkInterface.flags.isNotEmpty) ...[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Flags: ",
@ -64,11 +65,13 @@ class DhcpInterfaceItem extends StatelessWidget {
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
Text(
networkInterface.flags.join(', '),
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
Flexible(
child: Text(
networkInterface.flags.join(', '),
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
),
],

View file

@ -13,11 +13,11 @@ class SelectInterfaceModal extends StatelessWidget {
final bool dialog;
const SelectInterfaceModal({
Key? key,
super.key,
required this.interfaces,
required this.onSelect,
required this.dialog
}) : super(key: key);
});
@override
Widget build(BuildContext context) {