renderLineNumbersBoxAll renders the background for the line numbers in the LineNumberColor
()
| 416 | |
| 417 | // renderLineNumbersBoxAll renders the background for the line numbers in the LineNumberColor |
| 418 | func (ed *Editor) renderLineNumbersBoxAll() { |
| 419 | if !ed.hasLineNumbers { |
| 420 | return |
| 421 | } |
| 422 | pc := &ed.Scene.PaintContext |
| 423 | bb := ed.renderBBox() |
| 424 | spos := math32.Vector2FromPoint(bb.Min) |
| 425 | epos := math32.Vector2FromPoint(bb.Max) |
| 426 | epos.X = spos.X + ed.LineNumberOffset |
| 427 | |
| 428 | sz := epos.Sub(spos) |
| 429 | pc.FillStyle.Color = ed.LineNumberColor |
| 430 | pc.DrawRoundedRectangle(spos.X, spos.Y, sz.X, sz.Y, ed.Styles.Border.Radius.Dots()) |
| 431 | pc.Fill() |
| 432 | } |
| 433 | |
| 434 | // renderLineNumber renders given line number; called within context of other render. |
| 435 | // if defFill is true, it fills box color for default background color (use false for |
no test coverage detected