rfac: Alignment of messages and reaction bubbles
This commit is contained in:
@@ -466,18 +466,25 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: widget.padding ?? const EdgeInsets.all(8),
|
padding: widget.padding ?? const EdgeInsets.all(8),
|
||||||
child: FractionallySizedBox(
|
child: FractionallySizedBox(
|
||||||
alignment: Alignment.centerLeft,
|
alignment:
|
||||||
|
widget.reverse ? Alignment.centerRight : Alignment.centerLeft,
|
||||||
widthFactor: 0.78,
|
widthFactor: 0.78,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: widget.reverse
|
||||||
|
? CrossAxisAlignment.end
|
||||||
|
: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Stack(
|
Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
alignment: AlignmentDirectional.bottomStart,
|
alignment: widget.reverse
|
||||||
|
? AlignmentDirectional.bottomEnd
|
||||||
|
: AlignmentDirectional.bottomStart,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: widget.reverse
|
||||||
|
? CrossAxisAlignment.end
|
||||||
|
: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@@ -501,7 +508,8 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
child: _buildReactionIndicator(context),
|
child: _buildReactionIndicator(context),
|
||||||
),
|
),
|
||||||
portalAnchor: const Alignment(-1, -1),
|
portalAnchor: const Alignment(-1, -1),
|
||||||
childAnchor: const Alignment(1, -1),
|
childAnchor:
|
||||||
|
Alignment(widget.reverse ? -1 : 1, -1),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
@@ -736,6 +744,8 @@ class _MessageWidgetState extends State<MessageWidget>
|
|||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
mainAxisAlignment:
|
||||||
|
widget.reverse ? MainAxisAlignment.end : MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (showThreadTail)
|
if (showThreadTail)
|
||||||
Container(
|
Container(
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class ReactionBubble extends StatelessWidget {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Transform.translate(
|
Transform.translate(
|
||||||
offset: Offset(reverse ? offset : -offset, 0),
|
offset: Offset(reverse ? -offset : offset, 0),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(2),
|
padding: const EdgeInsets.all(2),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
Reference in New Issue
Block a user