merge: 调整二级筛选按钮尺寸
This commit is contained in:
commit
8197abd55d
4 files changed
+27
-9
No files matched your search
@@ -1111,7 +1111,7 @@ $ flutter test
|
||||
|
||||
## 2026-10-22 首页布局对齐修正
|
||||
|
||||
- 一级分类页内切换 6 个列表,未选 18/w400 `#B0B0B0`、选中 20/w700 白字,无下划线;二级 chips 仅精选显示。
|
||||
- 一级分类页内切换 6 个列表,未选 18/w400、选中 20/w700;二级 chips 与 26 高筛选按钮仅在精选显示。
|
||||
- 四类卡片去底板/描边,封面统一 3:4、8 圆角、行距 10、封底标题间距 6;状态角标为右上角紧凑异形丝带。
|
||||
- 标题下方恢复左对齐题材文字,使用 `|` 分隔、灰色小字,与封面状态角标保持独立。
|
||||
- 首页搜索栏到一级、一级到二级、二级到网格间距为 8/8/10;非精选 tab 直接以 10 衔接网格。
|
||||
|
||||
@@ -111,6 +111,9 @@ abstract final class AppDimens {
|
||||
static const double homeSecondaryTagHeight = 26;
|
||||
static const double homeSecondaryTagHorizontalPadding = 10;
|
||||
static const double homeSecondaryTagRadius = 13;
|
||||
static const double homeSecondaryFilterGap = 8;
|
||||
static const double homeSecondaryFilterVisualSize = 26;
|
||||
static const double homeSecondaryFilterIcon = 18;
|
||||
static const double homePrimaryCategoryGap = 24;
|
||||
static const double homeSecondaryTagGap = 14;
|
||||
static const double homeSearchTopGap = 0;
|
||||
|
||||
@@ -329,22 +329,25 @@ class HomeGridHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: AppDimens.spaceXs),
|
||||
const SizedBox(width: AppDimens.homeSecondaryFilterGap),
|
||||
Tooltip(
|
||||
message: l10n.filter,
|
||||
child: SizedBox.square(
|
||||
dimension: AppDimens.tapTarget,
|
||||
child: Material(
|
||||
color: AppColors.contentSurface,
|
||||
borderRadius: BorderRadius.circular(AppDimens.inputRadius),
|
||||
color: AppColors.transparent,
|
||||
child: InkWell(
|
||||
key: const Key('home-grid-filter'),
|
||||
borderRadius: BorderRadius.circular(AppDimens.inputRadius),
|
||||
onTap: callbacks.onOpenFilter,
|
||||
child: const Icon(
|
||||
Icons.filter_list_rounded,
|
||||
color: AppColors.navSelected,
|
||||
size: AppDimens.homeHeaderIcon,
|
||||
child: Center(
|
||||
child: SizedBox.square(
|
||||
dimension: AppDimens.homeSecondaryFilterVisualSize,
|
||||
child: const Icon(
|
||||
Icons.filter_list_rounded,
|
||||
color: AppColors.textTertiary,
|
||||
size: AppDimens.homeSecondaryFilterIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -94,6 +94,18 @@ void main() {
|
||||
expect(find.byKey(const Key('home-section-category-社群')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-secondary-tags')), findsOneWidget);
|
||||
expect(find.byKey(const Key('home-grid-filter')), findsOneWidget);
|
||||
expect(
|
||||
tester.getSize(find.byKey(const Key('home-grid-filter'))),
|
||||
const Size.square(AppDimens.tapTarget),
|
||||
);
|
||||
final filterIcon = tester.widget<Icon>(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('home-grid-filter')),
|
||||
matching: find.byIcon(Icons.filter_list_rounded),
|
||||
),
|
||||
);
|
||||
expect(filterIcon.size, AppDimens.homeSecondaryFilterIcon);
|
||||
expect(filterIcon.color, AppColors.textTertiary);
|
||||
final searchBox = find.descendant(
|
||||
of: find.byKey(const Key('home-search-entry')),
|
||||
matching: find.byType(Container),
|
||||
|
||||
Reference in new issue
Block a user