fix: the text and icon in + menu are not aligned in the same baseline (#4500)

This commit is contained in:
Lucas.Xu 2024-01-26 10:06:49 +08:00 committed by GitHub
parent 0e3ffa8fd5
commit 64cd7d41ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,6 +272,7 @@ class _AddBlockMenuItem extends StatelessWidget {
return GestureDetector(
onTap: data.onTap,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 68.0 * context.scale,
@ -289,9 +290,15 @@ class _AddBlockMenuItem extends StatelessWidget {
),
),
const VSpace(4),
FlowyText(
data.text,
fontSize: 12.0,
ConstrainedBox(
constraints: BoxConstraints(
maxWidth: 68.0 * context.scale,
),
child: FlowyText(
data.text,
fontSize: 12.0,
overflow: TextOverflow.ellipsis,
),
),
],
),