chore: disable custom message text sizing (#2355)
This commit is contained in:
parent
aaf0bc22d0
commit
e7a2d12a3c
4 changed files with 102 additions and 95 deletions
|
|
@ -323,18 +323,20 @@ class SettingsStyleView extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
),
|
||||
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,
|
||||
// ),
|
||||
// Pangea
|
||||
Divider(
|
||||
color: theme.dividerColor,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -175,88 +175,91 @@ class ActivitySuggestionsAreaState extends State<ActivitySuggestionsArea> {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
spacing: 8.0,
|
||||
children: [
|
||||
InkWell(
|
||||
customBorder: const CircleBorder(),
|
||||
onTap: () => context.go('/homepage/newgroup'),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(36.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 10.0,
|
||||
),
|
||||
child: Row(
|
||||
spacing: 8.0,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CustomizedSvg(
|
||||
svgUrl:
|
||||
"${AppConfig.assetsBaseURL}/${ActivitySuggestionsConstants.plusIconPath}",
|
||||
colorReplacements: {
|
||||
"#CDBEF9": colorToHex(
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
},
|
||||
height: 16.0,
|
||||
width: 16.0,
|
||||
),
|
||||
Text(
|
||||
isColumnMode
|
||||
? L10n.of(context).createOwnChat
|
||||
: L10n.of(context).chat,
|
||||
style: theme.textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
Material(
|
||||
type: MaterialType.transparency,
|
||||
child: Row(
|
||||
spacing: 8.0,
|
||||
children: [
|
||||
InkWell(
|
||||
customBorder: const CircleBorder(),
|
||||
onTap: () => context.go('/homepage/newgroup'),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(36.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 10.0,
|
||||
),
|
||||
child: Row(
|
||||
spacing: 8.0,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CustomizedSvg(
|
||||
svgUrl:
|
||||
"${AppConfig.assetsBaseURL}/${ActivitySuggestionsConstants.plusIconPath}",
|
||||
colorReplacements: {
|
||||
"#CDBEF9": colorToHex(
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
},
|
||||
height: 16.0,
|
||||
width: 16.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
Text(
|
||||
isColumnMode
|
||||
? L10n.of(context).createOwnChat
|
||||
: L10n.of(context).chat,
|
||||
style: theme.textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
customBorder: const CircleBorder(),
|
||||
onTap: () => context.go('/homepage/planner'),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(36.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 10.0,
|
||||
),
|
||||
child: Row(
|
||||
spacing: 8.0,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CustomizedSvg(
|
||||
svgUrl:
|
||||
"${AppConfig.assetsBaseURL}/${ActivitySuggestionsConstants.crayonIconPath}",
|
||||
colorReplacements: {
|
||||
"#CDBEF9": colorToHex(
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
},
|
||||
height: 16.0,
|
||||
width: 16.0,
|
||||
),
|
||||
Text(
|
||||
isColumnMode
|
||||
? L10n.of(context).makeYourOwnActivity
|
||||
: L10n.of(context).createActivity,
|
||||
style: theme.textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
InkWell(
|
||||
customBorder: const CircleBorder(),
|
||||
onTap: () => context.go('/homepage/planner'),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(36.0),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6.0,
|
||||
horizontal: 10.0,
|
||||
),
|
||||
child: Row(
|
||||
spacing: 8.0,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CustomizedSvg(
|
||||
svgUrl:
|
||||
"${AppConfig.assetsBaseURL}/${ActivitySuggestionsConstants.crayonIconPath}",
|
||||
colorReplacements: {
|
||||
"#CDBEF9": colorToHex(
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
},
|
||||
height: 16.0,
|
||||
width: 16.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
Text(
|
||||
isColumnMode
|
||||
? L10n.of(context).makeYourOwnActivity
|
||||
: L10n.of(context).createActivity,
|
||||
style: theme.textTheme.titleSmall?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -242,11 +242,11 @@ class MessageTextWidget extends StatelessWidget {
|
|||
? theme.colorScheme.onPrimary
|
||||
: theme.colorScheme.onSurface;
|
||||
|
||||
return RichText(
|
||||
return Text.rich(
|
||||
softWrap: softWrap ?? true,
|
||||
maxLines: maxLines,
|
||||
overflow: overflow ?? TextOverflow.clip,
|
||||
text: TextSpan(
|
||||
TextSpan(
|
||||
children:
|
||||
tokenPositions.mapIndexed((int i, TokenPosition tokenPosition) {
|
||||
final substring = messageCharacters
|
||||
|
|
@ -318,8 +318,8 @@ class MessageTextWidget extends StatelessWidget {
|
|||
onTap: onClick != null
|
||||
? () => onClick?.call(tokenPosition)
|
||||
: null,
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
if (start.isNotEmpty)
|
||||
LinkifySpan(
|
||||
|
|
|
|||
|
|
@ -436,9 +436,11 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
}
|
||||
|
||||
void initSettings() {
|
||||
AppConfig.fontSizeFactor =
|
||||
double.tryParse(store.getString(SettingKeys.fontSizeFactor) ?? '') ??
|
||||
AppConfig.fontSizeFactor;
|
||||
// #Pangea
|
||||
// AppConfig.fontSizeFactor =
|
||||
// double.tryParse(store.getString(SettingKeys.fontSizeFactor) ?? '') ??
|
||||
// AppConfig.fontSizeFactor;
|
||||
// Pangea#
|
||||
|
||||
AppConfig.renderHtml =
|
||||
store.getBool(SettingKeys.renderHtml) ?? AppConfig.renderHtml;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue