This repository was archived by the owner on Apr 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace Unity.UIWidgets.painting {
5
5
public enum RenderComparison {
6
6
identical ,
7
7
metadata ,
8
+ hoverCallback ,
8
9
paint ,
9
10
layout ,
10
11
}
Original file line number Diff line number Diff line change @@ -170,6 +170,11 @@ public RenderComparison compareTo(TextSpan other) {
170
170
RenderComparison result = Equals ( this . recognizer , other . recognizer )
171
171
? RenderComparison . identical
172
172
: RenderComparison . metadata ;
173
+
174
+ if ( ! Equals ( this . recognizer , other . recognizer ) ) {
175
+ result = RenderComparison . hoverCallback > result ? RenderComparison . hoverCallback : result ;
176
+ }
177
+
173
178
if ( this . style != null ) {
174
179
var candidate = this . style . compareTo ( other . style ) ;
175
180
if ( candidate > result ) {
Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ public TextSpan text {
91
91
case RenderComparison . identical :
92
92
case RenderComparison . metadata :
93
93
return ;
94
+ case RenderComparison . hoverCallback :
95
+ this . _textPainter . text = value ;
96
+ break ;
94
97
case RenderComparison . paint :
95
98
this . _textPainter . text = value ;
96
99
this . markNeedsPaint ( ) ;
You can’t perform that action at this time.
0 commit comments