chore: prevent overflow of reading assistance content popup (#2460)
This commit is contained in:
parent
4adedd6b78
commit
11b8d64346
2 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -331,7 +332,7 @@ class MessageOverlayController extends State<MessageSelectionOverlay>
|
|||
addBorder: false,
|
||||
overlayKey: "${selectedToken!.text.uniqueKey}_toolbar",
|
||||
maxHeight: AppConfig.toolbarMaxHeight,
|
||||
maxWidth: AppConfig.toolbarMinWidth,
|
||||
maxWidth: min(AppConfig.toolbarMinWidth, maxWidth),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
|
@ -147,7 +149,10 @@ class ReadingAssistanceContentState extends State<ReadingAssistanceContent> {
|
|||
),
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: AppConfig.toolbarMaxHeight,
|
||||
minWidth: AppConfig.toolbarMinWidth,
|
||||
minWidth: min(
|
||||
AppConfig.toolbarMinWidth,
|
||||
widget.overlayController.maxWidth,
|
||||
),
|
||||
minHeight: AppConfig.toolbarMinHeight,
|
||||
maxWidth: widget.overlayController.maxWidth,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue