TextBox defaults to black for a cursor color
This commit is contained in:
parent
180a5eb8d1
commit
ddde2a79a8
|
@ -186,12 +186,10 @@ func (this *textBox) drawDot (can canvas.Canvas) {
|
|||
face := this.attrFace.Value().Face
|
||||
textColor := this.attrTextColor.Value().Color
|
||||
dotColor := this.attrDotColor.Value().Color
|
||||
if textColor == nil { textColor = color.Transparent }
|
||||
if textColor == nil { textColor = color.Black }
|
||||
if dotColor == nil { dotColor = color.RGBA { G: 255, B: 255, A: 255 } }
|
||||
|
||||
pen := can.Pen()
|
||||
pen.Fill(color.Transparent)
|
||||
pen.Stroke(textColor)
|
||||
|
||||
bounds := this.InnerBounds()
|
||||
metrics := face.Metrics()
|
||||
|
@ -204,6 +202,7 @@ func (this *textBox) drawDot (can canvas.Canvas) {
|
|||
|
||||
switch {
|
||||
case dot.Empty():
|
||||
pen.Stroke(textColor)
|
||||
pen.StrokeWeight(1)
|
||||
pen.Path(roundPt(start.Add(ascent)), roundPt(start.Sub(descent)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user