style_default.go 493 B

12345678910111213141516171819202122232425
  1. // Copyright 2016 The G3N Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package gui
  5. var defaultStyle *Style
  6. // init sets the default style
  7. func init() {
  8. defaultStyle = NewLightStyle()
  9. }
  10. // StyleDefault returns a pointer to the current default style
  11. func StyleDefault() *Style {
  12. return defaultStyle
  13. }
  14. // SetStyleDefault sets the default style
  15. func SetStyleDefault(s *Style) {
  16. defaultStyle = s
  17. }