mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Adapt ui to support text scale
This commit is contained in:
parent
bddfac7e72
commit
c9c960d1ee
23 changed files with 624 additions and 495 deletions
|
@ -10,12 +10,12 @@ class BlockedServicesSection extends StatelessWidget {
|
|||
final void Function(bool) onUpdateServicesGlobalSettings;
|
||||
|
||||
const BlockedServicesSection({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.useGlobalSettingsServices,
|
||||
required this.blockedServices,
|
||||
required this.onUpdatedBlockedServices,
|
||||
required this.onUpdateServicesGlobalSettings
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -37,11 +37,13 @@ class BlockedServicesSection extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context)!.useGlobalSettings,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
Flexible(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.useGlobalSettings,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
),
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
|
@ -78,30 +80,32 @@ class BlockedServicesSection extends StatelessWidget {
|
|||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context)!.selectBlockedServices,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: useGlobalSettingsServices == false
|
||||
? Theme.of(context).colorScheme.onSurface
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
|
||||
),
|
||||
),
|
||||
if (useGlobalSettingsServices == false) ...[
|
||||
const SizedBox(height: 5),
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
blockedServices.isNotEmpty
|
||||
? "${blockedServices.length} ${AppLocalizations.of(context)!.servicesBlocked}"
|
||||
: AppLocalizations.of(context)!.noBlockedServicesSelected,
|
||||
AppLocalizations.of(context)!.selectBlockedServices,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor
|
||||
fontSize: 16,
|
||||
color: useGlobalSettingsServices == false
|
||||
? Theme.of(context).colorScheme.onSurface
|
||||
: Theme.of(context).colorScheme.onSurface.withOpacity(0.38),
|
||||
),
|
||||
)
|
||||
]
|
||||
],
|
||||
),
|
||||
if (useGlobalSettingsServices == false) ...[
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
blockedServices.isNotEmpty
|
||||
? "${blockedServices.length} ${AppLocalizations.of(context)!.servicesBlocked}"
|
||||
: AppLocalizations.of(context)!.noBlockedServicesSelected,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.iconColor
|
||||
),
|
||||
)
|
||||
]
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
@ -47,7 +47,7 @@ class ClientForm extends StatelessWidget {
|
|||
final void Function(bool) updateUseGlobalSettingsServices;
|
||||
|
||||
const ClientForm({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.isFullScreen,
|
||||
required this.client,
|
||||
required this.nameController,
|
||||
|
@ -75,7 +75,7 @@ class ClientForm extends StatelessWidget {
|
|||
required this.updateEnableSafeSearch,
|
||||
required this.updateSafeSearch,
|
||||
required this.updateUseGlobalSettingsServices,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -154,11 +154,13 @@ class ClientForm extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context)!.useGlobalSettings,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
Flexible(
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.useGlobalSettings,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context).colorScheme.onSurface
|
||||
),
|
||||
),
|
||||
),
|
||||
Switch(
|
||||
|
|
|
@ -27,12 +27,12 @@ class ClientScreen extends StatefulWidget {
|
|||
final bool fullScreen;
|
||||
|
||||
const ClientScreen({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.client,
|
||||
required this.onConfirm,
|
||||
this.onDelete,
|
||||
required this.fullScreen
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<ClientScreen> createState() => _ClientScreenState();
|
||||
|
|
|
@ -7,11 +7,11 @@ class TagsModal extends StatefulWidget {
|
|||
final void Function(List<String>) onConfirm;
|
||||
|
||||
const TagsModal({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.selectedTags,
|
||||
required this.tags,
|
||||
required this.onConfirm,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<TagsModal> createState() => _TagsModalState();
|
||||
|
@ -82,12 +82,14 @@ class _TagsModalState extends State<TagsModal> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
widget.tags[index],
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
Flexible(
|
||||
child: Text(
|
||||
widget.tags[index],
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
Checkbox(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue