From f025e8ee53a272f4a80de13fe6a888233a0f4bf3 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 26 Sep 2023 14:01:57 -0700 Subject: [PATCH 1/2] Font Scaling --- lib/cwtch/gomobile.dart | 1 - lib/views/peersettingsview.dart | 4 ++-- lib/widgets/DropdownContacts.dart | 8 +++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/cwtch/gomobile.dart b/lib/cwtch/gomobile.dart index ffc8f736..8c7fc359 100644 --- a/lib/cwtch/gomobile.dart +++ b/lib/cwtch/gomobile.dart @@ -469,5 +469,4 @@ class CwtchGomobile implements Cwtch { void PublishServerUpdate(String profile) { cwtchPlatform.invokeMethod("PublishServerUpdate", {"ProfileOnion": profile}); } - } diff --git a/lib/views/peersettingsview.dart b/lib/views/peersettingsview.dart index dcf721b4..8e1fe04c 100644 --- a/lib/views/peersettingsview.dart +++ b/lib/views/peersettingsview.dart @@ -316,7 +316,7 @@ class _PeerSettingsViewState extends State { icon: Icon(CwtchIcons.leave_group), label: Text( AppLocalizations.of(context)!.leaveConversation, - style: TextStyle(decoration: TextDecoration.underline), + style: settings.scaleFonts(defaultTextButtonStyle.copyWith(decoration: TextDecoration.underline)), ), )) ]) @@ -334,7 +334,7 @@ class _PeerSettingsViewState extends State { showAlertDialog(BuildContext context) { // set up the buttons - Widget cancelButton = TextButton( + Widget cancelButton = ElevatedButton( child: Text(AppLocalizations.of(context)!.cancel), style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.all(20))), onPressed: () { diff --git a/lib/widgets/DropdownContacts.dart b/lib/widgets/DropdownContacts.dart index ddac1a6e..dcaaf0d5 100644 --- a/lib/widgets/DropdownContacts.dart +++ b/lib/widgets/DropdownContacts.dart @@ -1,5 +1,6 @@ import 'package:cwtch/models/contact.dart'; import 'package:cwtch/models/profile.dart'; +import 'package:cwtch/themes/opaque.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -32,7 +33,12 @@ class _DropdownContactsState extends State { isExpanded: true, // magic property value: this.selected, items: Provider.of(context, listen: false).contactList.contacts.where(widget.filter).map>((ContactInfoState contact) { - return DropdownMenuItem(value: contact.onion, child: Text(contact.nickname)); + return DropdownMenuItem( + value: contact.onion, + child: Text( + contact.nickname, + style: defaultTextStyle, + )); }).toList(), onChanged: (String? newVal) { setState(() { From 020291dc9a862b93f119fc0766dea4400a331925 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 26 Sep 2023 14:04:11 -0700 Subject: [PATCH 2/2] Scale Contact Select --- lib/widgets/DropdownContacts.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/widgets/DropdownContacts.dart b/lib/widgets/DropdownContacts.dart index dcaaf0d5..aa373bc3 100644 --- a/lib/widgets/DropdownContacts.dart +++ b/lib/widgets/DropdownContacts.dart @@ -4,6 +4,8 @@ import 'package:cwtch/themes/opaque.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import '../settings.dart'; + bool noFilter(ContactInfoState peer) { return true; } @@ -37,7 +39,7 @@ class _DropdownContactsState extends State { value: contact.onion, child: Text( contact.nickname, - style: defaultTextStyle, + style: Provider.of(context).scaleFonts(defaultTextStyle), )); }).toList(), onChanged: (String? newVal) {