This commit is contained in:
Kelrap 2024-08-08 13:51:27 -04:00
parent ed57c340d1
commit 43d99c526a
4 changed files with 26 additions and 19 deletions

View file

@ -43,14 +43,14 @@ class MessageSelectionOverlay extends StatelessWidget {
bool showDown = false;
final double footerSize = PlatformInfos.isMobile
? PlatformInfos.isIOS
? 128
: 130
: 144;
? 127
: 106
: 143;
final double headerSize = PlatformInfos.isMobile
? PlatformInfos.isIOS
? 122
: 86
: 80;
? 121
: 84
: 79;
final double stackSize =
MediaQuery.of(context).size.height - footerSize - headerSize;
@ -77,10 +77,10 @@ class MessageSelectionOverlay extends StatelessWidget {
// If message is too long, or awkwardly positioned,
// center to avoid hitting edges of stack
if (transformTargetSize.height >= stackSize / 2 - 3 ||
(targetOffset.dy < headerSize + stackSize / 2 &&
(targetOffset.dy < headerSize + stackSize / 2 + 30 &&
targetOffset.dy + transformTargetSize.height >
headerSize + stackSize / 2)) {
center = stackSize / 2;
headerSize + stackSize / 2 - 30)) {
center = stackSize / 2 + (showDown ? -30 : 30);
}
}
@ -104,8 +104,8 @@ class MessageSelectionOverlay extends StatelessWidget {
controller: controller,
closeToolbar: closeToolbar,
),
const SizedBox(
height: 7,
SizedBox(
height: PlatformInfos.isAndroid ? 3 : 6,
),
Flexible(
child: Stack(
@ -133,8 +133,8 @@ class MessageSelectionOverlay extends StatelessWidget {
],
),
),
const SizedBox(
height: 7,
SizedBox(
height: PlatformInfos.isAndroid ? 3 : 6,
),
OverlayFooter(controller: controller),
],

View file

@ -334,8 +334,9 @@ class MessageToolbarState extends State<MessageToolbar> {
@override
Widget build(BuildContext context) {
final double maxHeight = (MediaQuery.of(context).size.height -
(PlatformInfos.isIOS ? 254 : 222)) /
2;
(PlatformInfos.isIOS ? 256 : 198)) /
2 +
30;
return Material(
type: MaterialType.transparency,

View file

@ -2,6 +2,7 @@ import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/chat_input_row.dart';
import 'package:fluffychat/pages/chat/reactions_picker.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
class OverlayFooter extends StatelessWidget {
@ -18,7 +19,7 @@ class OverlayFooter extends StatelessWidget {
return Container(
margin: EdgeInsets.only(
bottom: bottomSheetPadding,
bottom: PlatformInfos.isAndroid ? 0 : bottomSheetPadding,
left: bottomSheetPadding,
right: bottomSheetPadding,
),
@ -42,7 +43,11 @@ class OverlayFooter extends StatelessWidget {
),
),
SizedBox(
height: FluffyThemes.isColumnMode(context) ? 15.0 : 8.0,
height: FluffyThemes.isColumnMode(context)
? 15.0
: PlatformInfos.isAndroid
? 0
: 8.0,
),
],
),

View file

@ -87,8 +87,9 @@ class OverlayMessage extends StatelessWidget {
);
final double maxHeight = (MediaQuery.of(context).size.height -
(PlatformInfos.isIOS ? 244 : 222)) /
2;
(PlatformInfos.isIOS ? 256 : 198)) /
2 -
30;
final pangeaMessageEvent = PangeaMessageEvent(
event: event,