/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/previewpane/BgcodePreviewHandler/Settings.cs
38 строк
1 KB
Pedro Lamas
Adds BgcodeThumbnailProvider and BgcodePreviewHandler (#38667)
10 июл 2025, 12:20
Не верифицирован
10 июл 2025, 12:20
071f5d7
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace Microsoft.PowerToys.PreviewHandler.Bgcode { internal sealed class Settings { /// <summary> /// Gets the color of the window background. /// Even though this is not a setting yet, it's retrieved from a "Settings" class to be aligned with other preview handlers that contain this setting. /// It's possible it can be converted into a setting in the future. /// </summary> public static Color BackgroundColor { get { if (GetTheme() == "dark") { return Color.FromArgb(30, 30, 30); // #1e1e1e } else { return Color.White; } } } /// <summary> /// Returns the theme. /// </summary> /// <returns>Theme that should be used.</returns> public static string GetTheme() { return Common.UI.ThemeManager.GetWindowsBaseColor().ToLowerInvariant(); } } }