chore: revert changes to text sizing (#2458)
This commit is contained in:
parent
739e271cb4
commit
4adedd6b78
3 changed files with 19 additions and 23 deletions
|
|
@ -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,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue