Adding negativeConstant

This commit is contained in:
Leandro Borges Ferreira
2023-02-15 19:40:51 +01:00
parent 92a330cd71
commit 9fdc864af2
2 changed files with 6 additions and 6 deletions
@@ -148,7 +148,7 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
);
},
),
const SizedBox(height: 8),
const SizedBox(height: 10),
IgnorePointer(
child: widget.messageWidget,
),
@@ -294,13 +294,13 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
offset necessary for the position of reaction look the best way
possible.
*/
const offsetConstant = 2700;
final offsetCorrection = maxWidth / offsetConstant;
const positiveConstant = 2700;
const negativeConstant = 1700;
if (maxWidth <= 752) {
result = shiftFactor - offsetCorrection;
result = shiftFactor - maxWidth / negativeConstant;
} else {
result = shiftFactor + offsetCorrection;
result = shiftFactor + maxWidth / positiveConstant;
}
} else {
result = 1.2 - divFactor;
@@ -84,7 +84,7 @@ class StreamMessageReactionsModal extends StatelessWidget {
message: message,
),
),
const SizedBox(height: 8),
const SizedBox(height: 10),
IgnorePointer(
child: messageWidget,
),