Example #1
0
        internal static string GetIconPath(this IconType source, ThemeTone themeTone)
        {
            var themeSuffix = themeTone switch
            {
                ThemeTone.Lighter => "light",
                ThemeTone.Darker => "dark",
                _ => throw new Exception($"Unknown theme {themeTone}, cannot find image suffix.")
            };

            var fileName = $"{source.ToString().ToLower()}_{themeSuffix}.svg";

            return(Path.Combine(BaseIconPath, fileName));
        }
    }
Example #2
0
 internal static void SetPresetThemeTone(ThemeTone themeTone) => PresetThemeTone = themeTone;