chore: give minimum width to message token buttons and align tokens at the bottom of columns (#2785)
This commit is contained in:
parent
94728ad0ad
commit
fec642a451
2 changed files with 4 additions and 7 deletions
|
|
@ -290,7 +290,6 @@ class HtmlMessage extends StatelessWidget {
|
|||
);
|
||||
|
||||
return WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: CompositedTransformTarget(
|
||||
link: token != null && renderer.assignTokenKey
|
||||
? MatrixState.pAnyState
|
||||
|
|
@ -333,12 +332,12 @@ class HtmlMessage extends StatelessWidget {
|
|||
MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: onClick != null && token != null
|
||||
? () => onClick?.call(token)
|
||||
: null,
|
||||
child: Text.rich(
|
||||
textScaler: TextScaler.noScaling,
|
||||
TextSpan(
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
LinkifySpan(
|
||||
text: node.innerHtml,
|
||||
|
|
|
|||
|
|
@ -393,9 +393,7 @@ class MessageTokenButtonContent extends StatelessWidget {
|
|||
child: Container(
|
||||
height: height,
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
width: MessageMode.wordMeaning == messageMode
|
||||
? width
|
||||
: min(width, height),
|
||||
width: max(width, 24.0),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue