架构图增强:橡皮、手动确认识别(平板推荐)、连线一律正交+角点拖拽、手绘/连线职责分离、尺寸标注一键操作;帮助文件大规模更新;修复品牌按钮与 pubspec 描述

This commit is contained in:
2026-10-11 11:22:01 +08:00
parent 1762ee4abf
commit c8147e294d
16 changed files with 767 additions and 614 deletions
+44 -3
View File
@@ -1206,11 +1206,51 @@ class _AppShellState extends State<AppShell> {
child: Row(
children: <Widget>[
seg('选择', Icons.near_me_outlined, ArchTool.select, '选择 / 移动 / 缩放'),
seg('手绘', Icons.gesture, ArchTool.pen, '按住拖动绘制,松手自动识别为标准图形'),
seg('连线', Icons.arrow_right_alt, ArchTool.connect, '从图形拖到另一个图形'),
seg('手绘', Icons.gesture, ArchTool.pen,
c.archAutoRecognize ? '按住拖动绘制,松手自动识别' : '按住拖动绘制;画完点「识别」确认识别'),
seg('连线', Icons.arrow_right_alt, ArchTool.connect,
'从图形拖到另一个图形(横平竖直正交走线,角点可拖拽)'),
seg('橡皮', Icons.cleaning_services_outlined, ArchTool.eraser,
'擦除图形 / 墨迹 / 连线(拖动连擦,一次撤销可整体回退)'),
],
),
),
SizedBox(width: 6 * _toolScale),
// 「识别」确认按钮:手动模式下把待识别墨迹统一识别(自动模式下也可用)。
Container(
padding: EdgeInsets.all(3 * _toolScale),
decoration: BoxDecoration(
color: t.panel,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: t.line2),
),
child: InkWell(
onTap: c.arch.strokes.isEmpty ? null : c.archPlayDemo,
borderRadius: BorderRadius.circular(9),
child: Container(
height: 34 * _toolScale,
padding: EdgeInsets.symmetric(horizontal: 12 * _toolScale),
alignment: Alignment.center,
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Icon(Icons.auto_fix_high,
size: 15 * _toolScale,
color: c.arch.strokes.isEmpty ? t.dim : t.accent),
SizedBox(width: 5 * _toolScale),
Text(
'识别(${c.arch.strokes.length})',
style: TextStyle(
color: c.arch.strokes.isEmpty ? t.dim : t.accent,
fontSize: _toolFont(11),
fontWeight: FontWeight.w600,
),
),
],
),
),
),
),
],
);
}
@@ -2837,8 +2877,9 @@ class _AppShellState extends State<AppShell> {
? '草图·${sketchToolLabel(c.sketchTool)}'
: switch (c.archTool) {
ArchTool.select => '选择',
ArchTool.pen => '手绘识别',
ArchTool.pen => c.archAutoRecognize ? '手绘识别' : '手绘(待确认)',
ArchTool.connect => '连线',
ArchTool.eraser => '橡皮',
};
final List<String> items = <String>[
c.sketchMode ? '参数化草图' : '架构图模式',