resetStyleWidget resets the widget styles and applies the basic default styles specified in [styles.Style.Defaults].
()
| 81 | // resetStyleWidget resets the widget styles and applies the basic |
| 82 | // default styles specified in [styles.Style.Defaults]. |
| 83 | func (wb *WidgetBase) resetStyleWidget() { |
| 84 | s := &wb.Styles |
| 85 | |
| 86 | // need to persist state |
| 87 | state := s.State |
| 88 | *s = styles.Style{} |
| 89 | s.Defaults() |
| 90 | s.State = state |
| 91 | |
| 92 | // default to state layer associated with the state, |
| 93 | // which the developer can override in their stylers |
| 94 | // wb.Transition(&s.StateLayer, s.State.StateLayer(), 200*time.Millisecond, LinearTransition) |
| 95 | s.StateLayer = s.State.StateLayer() |
| 96 | |
| 97 | s.SetMono(false) |
| 98 | } |
| 99 | |
| 100 | // runStylers runs the [WidgetBase.Stylers]. |
| 101 | func (wb *WidgetBase) runStylers() { |
no test coverage detected