chore: revert changes to text sizing (#2458)

This commit is contained in:
ggurdin 2025-04-16 12:56:19 -04:00 committed by GitHub
parent 739e271cb4
commit 4adedd6b78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 23 deletions

View file

@ -323,20 +323,18 @@ class SettingsStyleView extends StatelessWidget {
);
},
),
// #Pangea
// ListTile(
// title: Text(L10n.of(context).fontSize),
// trailing: Text('× ${AppConfig.fontSizeFactor}'),
// ),
// Slider.adaptive(
// min: 0.5,
// max: 2.5,
// divisions: 20,
// value: AppConfig.fontSizeFactor,
// semanticFormatterCallback: (d) => d.toString(),
// onChanged: controller.changeFontSizeFactor,
// ),
// Pangea
ListTile(
title: Text(L10n.of(context).fontSize),
trailing: Text('× ${AppConfig.fontSizeFactor}'),
),
Slider.adaptive(
min: 0.5,
max: 2.5,
divisions: 20,
value: AppConfig.fontSizeFactor,
semanticFormatterCallback: (d) => d.toString(),
onChanged: controller.changeFontSizeFactor,
),
Divider(
color: theme.dividerColor,
),

View file

@ -164,11 +164,11 @@ class MessageTextWidget extends StatelessWidget {
? theme.colorScheme.onPrimary
: theme.colorScheme.onSurface;
return Text.rich(
return RichText(
softWrap: softWrap ?? true,
maxLines: maxLines,
overflow: overflow ?? TextOverflow.clip,
TextSpan(
text: TextSpan(
children:
tokenPositions.mapIndexed((int i, TokenPosition tokenPosition) {
final substring = messageCharacters
@ -246,8 +246,8 @@ class MessageTextWidget extends StatelessWidget {
onTap: onClick != null
? () => onClick?.call(tokenPosition)
: null,
child: Text.rich(
TextSpan(
child: RichText(
text: TextSpan(
children: [
if (start.isNotEmpty)
LinkifySpan(

View file

@ -436,11 +436,9 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
}
void initSettings() {
// #Pangea
// AppConfig.fontSizeFactor =
// double.tryParse(store.getString(SettingKeys.fontSizeFactor) ?? '') ??
// AppConfig.fontSizeFactor;
// Pangea#
AppConfig.fontSizeFactor =
double.tryParse(store.getString(SettingKeys.fontSizeFactor) ?? '') ??
AppConfig.fontSizeFactor;
AppConfig.renderHtml =
store.getBool(SettingKeys.renderHtml) ?? AppConfig.renderHtml;