text scaling fixes

This commit is contained in:
Christien Rioux 2025-05-25 23:34:47 -04:00
parent de691cd778
commit 00fed31ce7
24 changed files with 206 additions and 238 deletions

View file

@ -267,6 +267,7 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
leading: Navigator.canPop(context)
? IconButton(
icon: const Icon(Icons.arrow_back),
iconSize: 24.scaled(context),
onPressed: () {
singleFuture((this, _kDoBackArrow), () async {
if (_isModified) {
@ -299,14 +300,14 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
body: SingleChildScrollView(
child: Column(children: [
_editAccountForm(context).paddingLTRB(0, 0, 0, 32),
OptionBox(
StyledButtonBox(
instructions:
translate('edit_account_page.remove_account_description'),
buttonIcon: Icons.person_remove_alt_1,
buttonText: translate('edit_account_page.remove_account'),
onClick: _onRemoveAccount,
),
OptionBox(
StyledButtonBox(
instructions:
translate('edit_account_page.destroy_account_description'),
buttonIcon: Icons.person_off,

View file

@ -176,17 +176,8 @@ class _EditProfileFormState extends State<EditProfileForm> {
BuildContext context,
) {
final theme = Theme.of(context);
final scale = theme.extension<ScaleScheme>()!;
final scaleConfig = theme.extension<ScaleConfig>()!;
final textTheme = theme.textTheme;
late final Color border;
if (scaleConfig.useVisualIndicators && !scaleConfig.preferBorders) {
border = scale.primaryScale.elementBackground;
} else {
border = scale.primaryScale.border;
}
return FormBuilder(
key: _formKey,
autovalidateMode: AutovalidateMode.onUserInteraction,
@ -200,12 +191,7 @@ class _EditProfileFormState extends State<EditProfileForm> {
const Spacer(),
StyledAvatar(
name: _currentValueName,
size: 128,
borderColor: border,
foregroundColor: scale.primaryScale.primaryText,
backgroundColor: scale.primaryScale.primary,
scaleConfig: scaleConfig,
textStyle: theme.textTheme.titleLarge!.copyWith(fontSize: 64),
size: 128.scaled(context),
).paddingLTRB(0, 0, 0, 16),
const Spacer()
]),
@ -327,17 +313,19 @@ class _EditProfileFormState extends State<EditProfileForm> {
false;
return ElevatedButton(
onPressed: (networkReady && _isModified) ? _doSubmit : null,
child: Row(mainAxisSize: MainAxisSize.min, children: [
Icon(networkReady ? Icons.check : Icons.hourglass_empty,
size: 16.scaled(context))
.paddingLTRB(0, 0, 4.scaled(context), 0),
Text(networkReady
? widget.submitText
: widget.submitDisabledText)
.paddingLTRB(0, 0, 4.scaled(context), 0)
]),
);
onPressed: (networkReady && _isModified) ? _doSubmit : null,
child: Padding(
padding: EdgeInsetsGeometry.all(4.scaled(context)),
child: Row(mainAxisSize: MainAxisSize.min, children: [
Icon(networkReady ? Icons.check : Icons.hourglass_empty,
size: 16.scaled(context))
.paddingLTRB(0, 0, 4.scaled(context), 0),
Text(networkReady
? widget.submitText
: widget.submitDisabledText)
.paddingLTRB(0, 0, 4.scaled(context), 0)
]),
));
}),
const Spacer()
])

View file

@ -194,7 +194,7 @@ class _ShowRecoveryKeyPageState extends WindowSetupState<ShowRecoveryKeyPage> {
textAlign: TextAlign.center,
translate('show_recovery_key_page.instructions_options'))
.paddingLTRB(12, 0, 12, 24),
OptionBox(
StyledButtonBox(
instructions:
translate('show_recovery_key_page.instructions_print'),
buttonIcon: Icons.print,
@ -210,7 +210,7 @@ class _ShowRecoveryKeyPageState extends WindowSetupState<ShowRecoveryKeyPage> {
_codeHandled = true;
});
}),
OptionBox(
StyledButtonBox(
instructions:
translate('show_recovery_key_page.instructions_view'),
buttonIcon: Icons.edit_document,
@ -230,7 +230,7 @@ class _ShowRecoveryKeyPageState extends WindowSetupState<ShowRecoveryKeyPage> {
_codeHandled = true;
});
}),
OptionBox(
StyledButtonBox(
instructions:
translate('show_recovery_key_page.instructions_share'),
buttonIcon: Icons.ios_share,