applyStyle applies a window style to the window.
(s *WindowStyle)
| 262 | |
| 263 | // applyStyle applies a window style to the window. |
| 264 | func (w *Window) applyStyle(s *WindowStyle) { |
| 265 | |
| 266 | w.SetBordersColor4(&s.BorderColor) |
| 267 | w.SetBordersFrom(&s.Border) |
| 268 | w.SetPaddingsFrom(&s.Padding) |
| 269 | w.client.SetMarginsFrom(&s.Margin) |
| 270 | w.client.SetColor4(&s.BgColor) |
| 271 | if w.title != nil { |
| 272 | w.title.applyStyle(&s.TitleStyle) |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | // recalc recalculates the sizes and positions of the internal panels |
| 277 | // from the outside to the inside. |
no test coverage detected