implemented automatic theme change in editor