refactor(client): 裸色字面量 F0F6FF/F0F4FF 迁移到 token
入库选填区/退单提示条 F0F6FF → infoSoft;表格列头 F0F4FF → thBg; 登录历史项/外壳用户菜单 hover → rowHover、菜单文字 → text。 深色主题 B / 暖色主题 C 下这些 chrome 现可正确随主题换色。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -714,7 +714,7 @@ class _HistoryMenuItemState extends State<_HistoryMenuItem> {
|
||||
onExit: (_) => setState(() => _hovered = false),
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: Material(
|
||||
color: _hovered ? const Color(0xFFF0F4FF) : Colors.white,
|
||||
color: _hovered ? context.tokens.rowHover : context.tokens.surface,
|
||||
child: InkWell(
|
||||
onTap: widget.onSelected,
|
||||
child: Padding(
|
||||
|
||||
@@ -353,8 +353,8 @@ class _InventoryCheckScreenState extends ConsumerState<InventoryCheckScreen> {
|
||||
},
|
||||
children: [
|
||||
TableRow(
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFF0F4FF)),
|
||||
decoration: BoxDecoration(
|
||||
color: context.tokens.thBg),
|
||||
children: [
|
||||
'序号',
|
||||
'商品编码',
|
||||
|
||||
@@ -1012,8 +1012,8 @@ class _HoverMenuItemState extends State<_HoverMenuItem> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const color = Color(0xFF333333);
|
||||
const hoverBg = Color(0xFFF0F4FF);
|
||||
final color = context.tokens.text;
|
||||
final hoverBg = context.tokens.rowHover;
|
||||
|
||||
return MouseRegion(
|
||||
onEnter: (_) => setState(() => _hovered = true),
|
||||
|
||||
@@ -984,7 +984,7 @@ class _StockInFormScreenState extends ConsumerState<StockInFormScreen> {
|
||||
color: context.tokens.primaryDark)),
|
||||
);
|
||||
return Container(
|
||||
color: const Color(0xFFF0F4FF),
|
||||
color: context.tokens.thBg,
|
||||
child: Row(children: [
|
||||
SizedBox(width: 36, child: th('序号')),
|
||||
Expanded(flex: 18, child: th('名称')),
|
||||
@@ -1115,7 +1115,7 @@ class _StockInFormScreenState extends ConsumerState<StockInFormScreen> {
|
||||
Widget _buildOptionalSection(_ItemRow item) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF0F6FF),
|
||||
color: context.tokens.infoSoft,
|
||||
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
||||
),
|
||||
padding: const EdgeInsets.fromLTRB(16, 10, 16, 14),
|
||||
|
||||
@@ -1201,7 +1201,7 @@ class _StockInDetailDialogState extends ConsumerState<_StockInDetailDialog> {
|
||||
},
|
||||
children: [
|
||||
TableRow(
|
||||
decoration: const BoxDecoration(color: Color(0xFFF0F4FF)),
|
||||
decoration: BoxDecoration(color: context.tokens.thBg),
|
||||
children: ['序号', '商品编码', '名称', '系列', '规格', '生产日期', '批次号', '数量', '单价', '金额']
|
||||
.map((h) => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
||||
@@ -671,8 +671,8 @@ class _StockOutFormScreenState extends ConsumerState<StockOutFormScreen> {
|
||||
},
|
||||
children: [
|
||||
TableRow(
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFFF0F4FF)),
|
||||
decoration: BoxDecoration(
|
||||
color: context.tokens.thBg),
|
||||
children: [
|
||||
'序号',
|
||||
'商品编码',
|
||||
@@ -1091,7 +1091,7 @@ class _InventoryPickerDialogState
|
||||
),
|
||||
// Table header
|
||||
Container(
|
||||
color: const Color(0xFFF0F4FF),
|
||||
color: context.tokens.thBg,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
|
||||
@@ -150,7 +150,7 @@ class _DataTableCardState extends State<DataTableCard> {
|
||||
|
||||
TableRow _buildHeaderRow() {
|
||||
return TableRow(
|
||||
decoration: const BoxDecoration(color: Color(0xFFF0F4FF)),
|
||||
decoration: BoxDecoration(color: context.tokens.thBg),
|
||||
children: widget.columns.map((col) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
|
||||
@@ -270,7 +270,7 @@ class _OrderReturnDialogState extends State<_OrderReturnDialog> {
|
||||
margin: const EdgeInsets.fromLTRB(16, 2, 16, 8),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF0F6FF),
|
||||
color: context.tokens.infoSoft,
|
||||
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user