Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 9a9899f

Browse files
authored
Merge pull request #271 from Unity-Technologies/zxw/support_editor_dragdrop
text background color bug fix
2 parents e3b5991 + b19a76d commit 9a9899f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

com.unity.uiwidgets/Runtime/painting/text_style.cs

+1-7
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,6 @@ ParagraphStyle getParagraphStyle(
510510
}
511511

512512
public ui.TextStyle getTextStyle(float textScaleFactor = 1.0f) {
513-
var backgroundPaint = new Paint();
514-
if (background != null) {
515-
backgroundPaint = new Paint();
516-
backgroundPaint.color = backgroundColor;
517-
}
518-
519513
return new ui.TextStyle(
520514
color: color,
521515
decoration: decoration,
@@ -534,7 +528,7 @@ public ui.TextStyle getTextStyle(float textScaleFactor = 1.0f) {
534528
// locale: locale,
535529
foreground: foreground,
536530
background: background ?? (backgroundColor != null
537-
? backgroundPaint
531+
? new Paint {color = backgroundColor}
538532
: null
539533
),
540534
shadows: shadows?.Cast<Shadow>().ToList(),

0 commit comments

Comments
 (0)