fix(home): 重绘二级筛选三线图标
This commit is contained in:
1 parent
8197abd55d
commit
448010115f
5 files changed
+48
-13
No files matched your search
@@ -342,10 +342,12 @@ class HomeGridHeader extends StatelessWidget {
|
||||
child: Center(
|
||||
child: SizedBox.square(
|
||||
dimension: AppDimens.homeSecondaryFilterVisualSize,
|
||||
child: const Icon(
|
||||
Icons.filter_list_rounded,
|
||||
color: AppColors.textTertiary,
|
||||
size: AppDimens.homeSecondaryFilterIcon,
|
||||
child: const Center(
|
||||
child: CustomPaint(
|
||||
key: Key('home-secondary-filter-icon'),
|
||||
size: Size.square(AppDimens.homeSecondaryFilterIcon),
|
||||
painter: _ThreeLineFilterPainter(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -395,3 +397,26 @@ class HomeGridHeader extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ThreeLineFilterPainter extends CustomPainter {
|
||||
const _ThreeLineFilterPainter();
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final paint = Paint()
|
||||
..color = AppColors.textFilterIcon
|
||||
..strokeWidth = AppDimens.homeSecondaryFilterStroke
|
||||
..strokeCap = StrokeCap.butt;
|
||||
final positions = [
|
||||
size.height * 0.25,
|
||||
size.height * 0.5,
|
||||
size.height * 0.75,
|
||||
];
|
||||
for (final y in positions) {
|
||||
canvas.drawLine(Offset(0, y), Offset(size.width, y), paint);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(_ThreeLineFilterPainter oldDelegate) => false;
|
||||
}
|
||||
Reference in new issue
Block a user