|
@@ -419,11 +419,10 @@ class _NodeView extends StatelessWidget {
|
|
|
final body = _slot(context, b.body, parent.push(index, 0));
|
|
final body = _slot(context, b.body, parent.push(index, 0));
|
|
|
final variable = _slot(context, b.variable, parent.push(index, 1));
|
|
final variable = _slot(context, b.variable, parent.push(index, 1));
|
|
|
// 上下限紧贴运算符:槽的上下内边距收掉,再往中间拽几像素
|
|
// 上下限紧贴运算符:槽的上下内边距收掉,再往中间拽几像素
|
|
|
- final lower = Transform.translate(
|
|
|
|
|
- offset: const Offset(0, -3),
|
|
|
|
|
- child: _slot(context, b.lower, parent.push(index, 2),
|
|
|
|
|
- scale: 0.5, vpad: 0),
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ // 下限**不**上拽。字形在行框里的墨迹并不上下居中(∑ 偏上、基线以下留白多),
|
|
|
|
|
+ // 上下对称地拽同样的量,上限正好、下限就压到字形上了。
|
|
|
|
|
+ final lower = _slot(context, b.lower, parent.push(index, 2),
|
|
|
|
|
+ scale: 0.5, vpad: 0);
|
|
|
final upper = Transform.translate(
|
|
final upper = Transform.translate(
|
|
|
offset: const Offset(0, 3),
|
|
offset: const Offset(0, 3),
|
|
|
child: _slot(context, b.upper, parent.push(index, 3),
|
|
child: _slot(context, b.upper, parent.push(index, 3),
|
|
@@ -432,13 +431,16 @@ class _NodeView extends StatelessWidget {
|
|
|
|
|
|
|
|
if (b.kind == 'Limit') {
|
|
if (b.kind == 'Limit') {
|
|
|
// lim 下面写"x→0"
|
|
// lim 下面写"x→0"
|
|
|
|
|
+ // 三个元素**必须同一个字号**:框大小不同时居中对齐会让基线错开,
|
|
|
|
|
+ // 横着的箭头就没法同时正对两端的 x 和数字。
|
|
|
final under = Row(
|
|
final under = Row(
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
children: [
|
|
children: [
|
|
|
_slot(context, b.variable, parent.push(index, 1),
|
|
_slot(context, b.variable, parent.push(index, 1),
|
|
|
scale: 0.6, vpad: 0),
|
|
scale: 0.6, vpad: 0),
|
|
|
Text('→', style: _mathStyle(context, 0.6).copyWith(height: 1.0)),
|
|
Text('→', style: _mathStyle(context, 0.6).copyWith(height: 1.0)),
|
|
|
- lower,
|
|
|
|
|
|
|
+ _slot(context, b.lower, parent.push(index, 2),
|
|
|
|
|
+ scale: 0.6, vpad: 0),
|
|
|
],
|
|
],
|
|
|
);
|
|
);
|
|
|
return _row([
|
|
return _row([
|