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

View File

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