From df461c2375886178f710833f72491d0ebd1def8f Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 10 Mar 2024 19:41:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=90=8E=EF=BC=8C=E4=B8=93=E6=A0=8F=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=AE=BD=E5=BA=A6=E8=B7=9F=E9=9A=8F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/html_render.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/common/widgets/html_render.dart b/lib/common/widgets/html_render.dart index a311f9fe..fed456a7 100644 --- a/lib/common/widgets/html_render.dart +++ b/lib/common/widgets/html_render.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:get/get.dart'; +import '../../utils/storage.dart'; import 'network_img_layer.dart'; // ignore: must_be_immutable @@ -18,6 +19,8 @@ class HtmlRender extends StatelessWidget { @override Widget build(BuildContext context) { + double textScale = + setting.get(SettingBoxKey.defaultTextScale, defaultValue: 1.0); return Html( data: htmlContent, onLinkTap: (String? url, Map buildContext, attributes) {}, @@ -54,7 +57,7 @@ class HtmlRender extends StatelessWidget { // height: isEmote ? 22 : null, // ); return NetworkImgLayer( - width: isEmote ? 22 : Get.size.width - 24, + width: isEmote ? 22 : (Get.size.width - 23) / textScale, height: isEmote ? 22 : 200, src: imgUrl, ignoreHeight: !isEmote,