浏览代码

fix

/siyaoH-1.17-fixAndroid
siyao 3 年前
当前提交
05a6592d
共有 1 个文件被更改,包括 40 次插入41 次删除
  1. 81
      com.unity.uiwidgets/Runtime/widgets/text_selection.cs

81
com.unity.uiwidgets/Runtime/widgets/text_selection.cs


using Unity.UIWidgets.scheduler;
using Unity.UIWidgets.service;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using UnityEngine;
using Object = System.Object;
using Rect = Unity.UIWidgets.ui.Rect;

return new Container(); // hide the second handle when collapsed
}
return new Positioned(
top: 0,
left: 0,
child: new Visibility(
visible: handlesVisible,
child: new _TextSelectionHandleOverlay(
onSelectionHandleChanged: (TextSelection newSelection) => {
_handleSelectionHandleChanged(newSelection, position);
},
onSelectionHandleTapped: onSelectionHandleTapped,
startHandleLayerLink: startHandleLayerLink,
endHandleLayerLink: endHandleLayerLink,
renderObject: renderObject,
selection: _selection,
selectionControls: selectionControls,
position: position,
dragStartBehavior: dragStartBehavior
)
return new Visibility(
visible: handlesVisible,
child: new _TextSelectionHandleOverlay(
onSelectionHandleChanged: (TextSelection newSelection) => {
_handleSelectionHandleChanged(newSelection, position);
},
onSelectionHandleTapped: onSelectionHandleTapped,
startHandleLayerLink: startHandleLayerLink,
endHandleLayerLink: endHandleLayerLink,
renderObject: renderObject,
selection: _selection,
selectionControls: selectionControls,
position: position,
dragStartBehavior: dragStartBehavior
)
);
}

Mathf.Max((interactiveRect.height - handleRect.height) / 2, 0)
);
return new CompositedTransformFollower(
link: layerLink,
offset: interactiveRect.topLeft,
showWhenUnlinked: false,
child: new FadeTransition(
opacity: _opacity,
child: new GestureDetector(
behavior: HitTestBehavior.translucent,
dragStartBehavior: widget.dragStartBehavior,
onPanStart: _handleDragStart,
onPanUpdate: _handleDragUpdate,
onTap: _handleTap,
child: new Padding(
padding: EdgeInsets.only(
left: padding.left,
top: padding.top,
right: padding.right,
bottom: padding.bottom
),
child: widget.selectionControls.buildHandle(context, type,
widget.renderObject.preferredLineHeight)
return new Stack(
children: new List<Widget>() {
new CompositedTransformFollower(
link: layerLink,
offset: interactiveRect.topLeft,
showWhenUnlinked: false,
child: new FadeTransition(
opacity: _opacity,
child: new GestureDetector(
behavior: HitTestBehavior.translucent,
dragStartBehavior: widget.dragStartBehavior,
onPanStart: _handleDragStart,
onPanUpdate: _handleDragUpdate,
onTap: _handleTap,
child: new Padding(
padding: EdgeInsets.only(
left: padding.left,
top: padding.top,
right: padding.right,
bottom: padding.bottom
),
child: widget.selectionControls.buildHandle(context, type,
widget.renderObject.preferredLineHeight)
)
)
)
}
);
}

正在加载...
取消
保存