fix(app): poster title truly left-aligned — Column crossAxisAlignment start (QR re-centered)

Text 的 textAlign 被 Column 默认 center 吞掉(文本行收缩包裹时对齐不生效);
文字区 Column 改 CrossAxisAlignment.start,二维码+扫码说明显式 Center 回居中。

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-23 16:30:14 +08:00
parent a16fa738f6
commit 985829fee8
4 changed files with 19 additions and 14 deletions
+18 -11
View File
@@ -448,8 +448,11 @@ class _PosterSheetState extends ConsumerState<_PosterSheet> {
Padding(
padding: const EdgeInsets.all(kSpace24),
child: Column(
// 标题/时间/地址居左(Column 默认 center 会吞掉
// Text 的 textAlign——对齐由这里统一决定)。
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 活动标题(居左;二维码保持居中)。
// 活动标题(居左)。
Text(
title,
textAlign: TextAlign.left,
@@ -509,18 +512,22 @@ class _PosterSheetState extends ConsumerState<_PosterSheet> {
),
],
const SizedBox(height: kSpace24),
// 二维码(白底保持扫码对比度)。
QrImageView(
data: url,
version: QrVersions.auto,
size: 200,
backgroundColor: Colors.white,
// 二维码 + 说明:保持居中(文字区居左的例外)。
Center(
child: QrImageView(
data: url,
version: QrVersions.auto,
size: 200,
backgroundColor: Colors.white,
),
),
const SizedBox(height: kSpace12),
Text(
l10n.shareScanHint,
style: theme.textTheme.bodySmall?.copyWith(
color: const Color(0xFF69778E),
Center(
child: Text(
l10n.shareScanHint,
style: theme.textTheme.bodySmall?.copyWith(
color: const Color(0xFF69778E),
),
),
),
],
+1 -3
View File
@@ -370,9 +370,7 @@ test.describe.serial('E04 interactions: pause, click lock, keyboard, destroy', (
await frame.waitFor();
const inside = page.frameLocator('iframe[src*="/embed/"][src*="v=2"]');
await page.waitForTimeout(1200);
// 聚焦流区域(点击视口非链接处不触发照片点击——顶部渐隐带命中视口)。
const box = await frame.boundingBox();
await page.mouse.click((box!.x ?? 0) + 90, (box!.y ?? 0) + 6);
// 聚焦流区域(程序化聚焦,不点击——照片点击现会打开宿主详情弹框)。
await inside.locator('.stream-viewport').focus();
await page.keyboard.press(' ');
await page.waitForTimeout(300);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 106 KiB