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),
|
onExit: (_) => setState(() => _hovered = false),
|
||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: _hovered ? const Color(0xFFF0F4FF) : Colors.white,
|
color: _hovered ? context.tokens.rowHover : context.tokens.surface,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: widget.onSelected,
|
onTap: widget.onSelected,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|||||||
@@ -353,8 +353,8 @@ class _InventoryCheckScreenState extends ConsumerState<InventoryCheckScreen> {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
TableRow(
|
TableRow(
|
||||||
decoration: const BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFF0F4FF)),
|
color: context.tokens.thBg),
|
||||||
children: [
|
children: [
|
||||||
'序号',
|
'序号',
|
||||||
'商品编码',
|
'商品编码',
|
||||||
|
|||||||
@@ -1012,8 +1012,8 @@ class _HoverMenuItemState extends State<_HoverMenuItem> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const color = Color(0xFF333333);
|
final color = context.tokens.text;
|
||||||
const hoverBg = Color(0xFFF0F4FF);
|
final hoverBg = context.tokens.rowHover;
|
||||||
|
|
||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
onEnter: (_) => setState(() => _hovered = true),
|
onEnter: (_) => setState(() => _hovered = true),
|
||||||
|
|||||||
@@ -984,7 +984,7 @@ class _StockInFormScreenState extends ConsumerState<StockInFormScreen> {
|
|||||||
color: context.tokens.primaryDark)),
|
color: context.tokens.primaryDark)),
|
||||||
);
|
);
|
||||||
return Container(
|
return Container(
|
||||||
color: const Color(0xFFF0F4FF),
|
color: context.tokens.thBg,
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
SizedBox(width: 36, child: th('序号')),
|
SizedBox(width: 36, child: th('序号')),
|
||||||
Expanded(flex: 18, child: th('名称')),
|
Expanded(flex: 18, child: th('名称')),
|
||||||
@@ -1115,7 +1115,7 @@ class _StockInFormScreenState extends ConsumerState<StockInFormScreen> {
|
|||||||
Widget _buildOptionalSection(_ItemRow item) {
|
Widget _buildOptionalSection(_ItemRow item) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFFF0F6FF),
|
color: context.tokens.infoSoft,
|
||||||
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.fromLTRB(16, 10, 16, 14),
|
padding: const EdgeInsets.fromLTRB(16, 10, 16, 14),
|
||||||
|
|||||||
@@ -1201,7 +1201,7 @@ class _StockInDetailDialogState extends ConsumerState<_StockInDetailDialog> {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
TableRow(
|
TableRow(
|
||||||
decoration: const BoxDecoration(color: Color(0xFFF0F4FF)),
|
decoration: BoxDecoration(color: context.tokens.thBg),
|
||||||
children: ['序号', '商品编码', '名称', '系列', '规格', '生产日期', '批次号', '数量', '单价', '金额']
|
children: ['序号', '商品编码', '名称', '系列', '规格', '生产日期', '批次号', '数量', '单价', '金额']
|
||||||
.map((h) => Padding(
|
.map((h) => Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
|
|||||||
@@ -671,8 +671,8 @@ class _StockOutFormScreenState extends ConsumerState<StockOutFormScreen> {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
TableRow(
|
TableRow(
|
||||||
decoration: const BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFF0F4FF)),
|
color: context.tokens.thBg),
|
||||||
children: [
|
children: [
|
||||||
'序号',
|
'序号',
|
||||||
'商品编码',
|
'商品编码',
|
||||||
@@ -1091,7 +1091,7 @@ class _InventoryPickerDialogState
|
|||||||
),
|
),
|
||||||
// Table header
|
// Table header
|
||||||
Container(
|
Container(
|
||||||
color: const Color(0xFFF0F4FF),
|
color: context.tokens.thBg,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class _DataTableCardState extends State<DataTableCard> {
|
|||||||
|
|
||||||
TableRow _buildHeaderRow() {
|
TableRow _buildHeaderRow() {
|
||||||
return TableRow(
|
return TableRow(
|
||||||
decoration: const BoxDecoration(color: Color(0xFFF0F4FF)),
|
decoration: BoxDecoration(color: context.tokens.thBg),
|
||||||
children: widget.columns.map((col) {
|
children: widget.columns.map((col) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
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),
|
margin: const EdgeInsets.fromLTRB(16, 2, 16, 8),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFFF0F6FF),
|
color: context.tokens.infoSoft,
|
||||||
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
border: Border(left: BorderSide(color: context.tokens.primary, width: 3)),
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user