1.3.7:安卓体验修复(logo 按钮等高同形、识别只识别当前墨迹、移除示例入口、尺寸区置顶)+ 修复编辑对话框控制器释放时序
This commit is contained in:
+43
-101
@@ -16,7 +16,6 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import '../arch/arch_models.dart';
|
||||
import '../arch/arch_painter.dart';
|
||||
import '../arch/arch_samples.dart';
|
||||
import '../library/symbol_library.dart';
|
||||
import '../persistence/android_docs.dart';
|
||||
import '../sketch/sketch_models.dart';
|
||||
@@ -348,69 +347,26 @@ class ArchLeftBody extends StatelessWidget {
|
||||
Text('影响新绘制的图形;选中图形后点色块可直接换色(支持多选)。',
|
||||
style: TextStyle(color: t.dim, fontSize: 10, height: 1.5)),
|
||||
const SizedBox(height: 14),
|
||||
_sec(t, '示例场景'),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed: () => c.archLoadDemo(ArchDemoKind.ink),
|
||||
style: _btnStyle(),
|
||||
child: const Text('手绘稿'),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextButton.icon(
|
||||
onPressed: c.archClear,
|
||||
icon: const Icon(Icons.delete_sweep_outlined, size: 15),
|
||||
label: const Text('清空画布'),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: t.danger,
|
||||
visualDensity: VisualDensity.compact,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 11.5,
|
||||
fontFamily: 'Microsoft YaHei UI',
|
||||
fontFamilyFallback: <String>[
|
||||
'Microsoft YaHei',
|
||||
'Segoe UI',
|
||||
'sans-serif',
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: FilledButton(
|
||||
onPressed: c.archPlayDemo,
|
||||
style: FilledButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 11.5,
|
||||
fontFamily: 'Microsoft YaHei UI',
|
||||
fontFamilyFallback: <String>[
|
||||
'Microsoft YaHei',
|
||||
'Segoe UI',
|
||||
'sans-serif',
|
||||
],
|
||||
),
|
||||
),
|
||||
child: const Text('识别墨迹 ▶'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed: () => c.archLoadDemo(ArchDemoKind.done),
|
||||
style: _btnStyle(),
|
||||
child: const Text('完成图'),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
onPressed: c.archClear,
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: t.danger,
|
||||
visualDensity: VisualDensity.compact,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 11.5,
|
||||
fontFamily: 'Microsoft YaHei UI',
|
||||
fontFamilyFallback: <String>[
|
||||
'Microsoft YaHei',
|
||||
'Segoe UI',
|
||||
'sans-serif',
|
||||
],
|
||||
),
|
||||
),
|
||||
child: const Text('清空画布'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
Container(
|
||||
@@ -543,20 +499,6 @@ class ArchLeftBody extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 小尺寸描边按钮样式。
|
||||
ButtonStyle _btnStyle() => OutlinedButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 11.5,
|
||||
fontFamily: 'Microsoft YaHei UI',
|
||||
fontFamilyFallback: <String>[
|
||||
'Microsoft YaHei',
|
||||
'Segoe UI',
|
||||
'sans-serif',
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 架构图右侧栏主体:选中对象属性(支持多选)。
|
||||
@@ -662,31 +604,6 @@ class ArchRightBody extends StatelessWidget {
|
||||
style: TextStyle(color: t.sub, fontSize: 11),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
_mini(t, '编辑文字', () => _editText(context, c, s)),
|
||||
const SizedBox(width: 6),
|
||||
_mini(t, '上移一层', () => c.moveArchZ(s, 1)),
|
||||
const SizedBox(width: 6),
|
||||
_mini(t, '下移一层', () => c.moveArchZ(s, -1)),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
if (s.type == ArchShapeType.polyline ||
|
||||
s.type == ArchShapeType.curve) ...<Widget>[
|
||||
_mini(
|
||||
t,
|
||||
s.type == ArchShapeType.polyline ? '平滑为曲线' : '折线化',
|
||||
() => _togglePolyCurve(c, s),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
],
|
||||
_mini(t, '删除(Del)', c.removeArchSelection, danger: true),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text('尺寸 · mm(点数值直接修改)',
|
||||
@@ -771,6 +688,31 @@ class ArchRightBody extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
_mini(t, '编辑文字', () => _editText(context, c, s)),
|
||||
const SizedBox(width: 6),
|
||||
_mini(t, '上移一层', () => c.moveArchZ(s, 1)),
|
||||
const SizedBox(width: 6),
|
||||
_mini(t, '下移一层', () => c.moveArchZ(s, -1)),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
if (s.type == ArchShapeType.polyline ||
|
||||
s.type == ArchShapeType.curve) ...<Widget>[
|
||||
_mini(
|
||||
t,
|
||||
s.type == ArchShapeType.polyline ? '平滑为曲线' : '折线化',
|
||||
() => _togglePolyCurve(c, s),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
],
|
||||
_mini(t, '删除(Del)', c.removeArchSelection, danger: true),
|
||||
],
|
||||
),
|
||||
])
|
||||
else if (cn != null)
|
||||
_card(t, <Widget>[
|
||||
|
||||
Reference in New Issue
Block a user