func SetCurrentTheme(name string) bool {
	thememtx.RLock()
	_, ok := themeManager.themes[name]
	thememtx.RUnlock()

	if !ok {
		tnames := ThemeNames()
		for _, theme := range tnames {
			if theme == name {
				themeManager.loadTheme(theme)
				break
			}
		}
	}

	thememtx.Lock()
	defer thememtx.Unlock()

	if _, ok := themeManager.themes[name]; ok {
		themeManager.current = name
		return true
	}
	return false
}
func SetCurrentTheme(name string) bool {
	thememtx.RLock()
	_, ok := themeManager.themes[name]
	thememtx.RUnlock()

	if !ok {
		tnames := ThemeNames()
		for _, theme := range tnames {
			if theme == name {
				themeManager.loadTheme(theme)
				break
			}
		}
	}

	thememtx.Lock()
	defer thememtx.Unlock()

	if _, ok := themeManager.themes[name]; ok {
		themeManager.current = name
		return true
	}
	return false
}
func SetCurrentTheme ( name string ) bool { thememtx . RLock ( ) _ , ok := themeManager . themes [ name ] thememtx . RUnlock ( ) if ! ok { tnames := ThemeNames ( ) for _ , theme := range tnames { if theme == name { themeManager . loadTheme ( theme ) break } } } thememtx . Lock ( ) defer thememtx . Unlock ( ) if _ , ok := themeManager . themes [ name ] ; ok { themeManager . current = name return true } return false }
// SetCurrentTheme changes the current theme.
// Returns false if changing failed - e.g, theme does not exist
SetCurrentTheme changes the current theme . Returns false if changing failed - e . g theme does not exist