/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/powerdisplay/PowerDisplay/Configuration/AppConstants.cs
55 строк
2 KB
Niels Laute
[PowerDisplay] Debounced + wheel-scrollable brightness/contrast/volume sliders (#47756)
11 май 2026, 10:15
Не верифицирован
11 май 2026, 10:15
0e766bc
Код
Авторство
О чём код?
// 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 PowerDisplay.Configuration { /// <summary> /// Application-wide constants and configuration values /// </summary> public static class AppConstants { /// <summary> /// UI layout and timing constants /// </summary> public static class UI { // Main flyout dimensions in device-independent pixels (DIP) public const int WindowWidthDip = 348; public const int WindowMinHeightDip = 100; public const int WindowMaxHeightDip = 650; public const int WindowRightMarginDip = 12; public const int WindowBottomMarginDip = WindowRightMarginDip; public const double WindowMaxWorkAreaHeightRatio = 0.75; // Adaptive flyout bounds in device-independent pixels (DIP) public const int FlyoutContextMenuMaxWidthDip = 320; public const int FlyoutContextMenuAdaptiveMaxWidthDip = 420; public const double FlyoutContextMenuMaxWorkAreaWidthRatio = 0.35; // Identify overlay bounds in device-independent pixels (DIP) public const int IdentifyWindowPreferredWidthDip = 300; public const int IdentifyWindowPreferredHeightDip = 280; public const int IdentifyWindowMinWidthDip = 160; public const int IdentifyWindowMinHeightDip = 160; public const double IdentifyWindowMaxWorkAreaRatio = 0.28; /// <summary> /// Icon glyph for internal/laptop displays (WMI) /// </summary> public const string InternalMonitorGlyph = "\uE7F8"; /// <summary> /// Icon glyph for external monitors (DDC/CI) /// </summary> public const string ExternalMonitorGlyph = "\uE7F4"; /// <summary> /// Debounce delay for committing slider changes (brightness, contrast, volume) /// to hardware. Restarts on every value change so a drag/keyboard repeat fires /// a single DDC/CI write once the user stops moving. /// </summary> public const int SliderCommitDebounceMs = 200; } } }