applyStyle applies the specified style
(s *EditStyle)
| 326 | |
| 327 | // applyStyle applies the specified style |
| 328 | func (ed *Edit) applyStyle(s *EditStyle) { |
| 329 | |
| 330 | ed.SetBordersFrom(&s.Border) |
| 331 | ed.SetBordersColor4(&s.BorderColor) |
| 332 | ed.SetPaddingsFrom(&s.Paddings) |
| 333 | ed.Label.SetColor4(&s.FgColor) |
| 334 | ed.Label.SetBgColor4(&s.BgColor) |
| 335 | //ed.Label.SetBgAlpha(s.BgAlpha) |
| 336 | |
| 337 | if !ed.focus && len(ed.text) == 0 && len(ed.placeHolder) > 0 { |
| 338 | ed.Label.SetColor4(&s.HolderColor) |
| 339 | ed.Label.setTextCaret(ed.placeHolder, editMarginX, ed.width, -1, ed.col) |
| 340 | } else { |
| 341 | ed.Label.SetColor4(&s.FgColor) |
| 342 | ed.redraw(ed.focus) |
| 343 | } |
| 344 | } |
no test coverage detected