From 23f474dfb26bae38b04558fa543060c1882b7e13 Mon Sep 17 00:00:00 2001 From: sorairo Date: Tue, 22 Aug 2023 06:16:20 +0900 Subject: [PATCH] =?UTF-8?q?#1=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/view/common/misskey_notes/misskey_note.dart | 2 +- lib/view/common/misskey_notes/reaction_button.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/view/common/misskey_notes/misskey_note.dart b/lib/view/common/misskey_notes/misskey_note.dart index 7eb9ff769..1d7d3c7d5 100644 --- a/lib/view/common/misskey_notes/misskey_note.dart +++ b/lib/view/common/misskey_notes/misskey_note.dart @@ -257,7 +257,7 @@ class MisskeyNoteState extends ConsumerState { .select((value) => value.noteStatuses[widget.note.id]!.isLongVisible)); return MediaQuery( - data: MediaQueryData( + data: MediaQuery.of(context).copyWith( textScaleFactor: MediaQuery.of(context).textScaleFactor * (widget.recursive > 1 ? 0.7 : 1)), child: RepaintBoundary( diff --git a/lib/view/common/misskey_notes/reaction_button.dart b/lib/view/common/misskey_notes/reaction_button.dart index 96c014059..7aaf44368 100644 --- a/lib/view/common/misskey_notes/reaction_button.dart +++ b/lib/view/common/misskey_notes/reaction_button.dart @@ -1,3 +1,5 @@ +import 'dart:math'; + import 'package:flutter/material.dart'; import 'package:miria/model/account.dart'; import 'package:miria/model/misskey_emoji_data.dart'; @@ -113,7 +115,7 @@ class ReactionButtonState extends ConsumerState { children: [ ConstrainedBox( constraints: BoxConstraints( - maxWidth: double.infinity, + maxWidth: min(MediaQuery.of(context).size.width, 800) * 0.75, minHeight: 24 * MediaQuery.of(context).textScaleFactor, maxHeight: 24 * MediaQuery.of(context).textScaleFactor, ),