mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request 1. Fix quick access not working bug 2. Add custom value mapping 3. Fix some vcp slider visibility bug demo for custom vcp value name mapping: <img width="1399" height="744" alt="image" src="https://github.com/user-attachments/assets/517e4dbb-409a-4e43-b15a-d0d31e59ce49" /> <img width="1379" height="337" alt="image" src="https://github.com/user-attachments/assets/18f6f389-089c-4441-ad9f-5c45cac53814" /> <img width="521" height="1152" alt="image" src="https://github.com/user-attachments/assets/27b5f796-66fa-4781-b16f-4770bebf3504" /> <img width="295" height="808" alt="image" src="https://github.com/user-attachments/assets/54eaf5b9-5d54-4531-a40b-de3113122715" /> <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [ ] Closes: #xxx <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx <!-- Provide a more detailed description of the PR, other things fixed, or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed --------- Co-authored-by: Yu Leng <yuleng@microsoft.com>
74 lines
2.9 KiB
C#
74 lines
2.9 KiB
C#
// 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.
|
|
|
|
using System.Collections.Generic;
|
|
using System.Text.Json.Serialization;
|
|
using PowerDisplay.Common.Models;
|
|
using Settings.UI.Library.Attributes;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
{
|
|
public class PowerDisplayProperties
|
|
{
|
|
[CmdConfigureIgnore]
|
|
public HotkeySettings DefaultActivationShortcut => new HotkeySettings(true, true, false, true, 0x44); // Ctrl+Shift+Win+D (win, ctrl, alt, shift, code)
|
|
|
|
public PowerDisplayProperties()
|
|
{
|
|
ActivationShortcut = DefaultActivationShortcut;
|
|
MonitorRefreshDelay = 5;
|
|
Monitors = new List<MonitorInfo>();
|
|
RestoreSettingsOnStartup = false;
|
|
ShowSystemTrayIcon = true;
|
|
ShowProfileSwitcher = true;
|
|
ShowIdentifyMonitorsButton = true;
|
|
CustomVcpMappings = new List<CustomVcpValueMapping>();
|
|
|
|
// Note: saved_monitor_settings has been moved to monitor_state.json
|
|
// which is managed separately by PowerDisplay app
|
|
}
|
|
|
|
[JsonPropertyName("activation_shortcut")]
|
|
public HotkeySettings ActivationShortcut { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets delay in seconds before refreshing monitors after display changes (hot-plug).
|
|
/// This allows hardware to stabilize before querying DDC/CI.
|
|
/// </summary>
|
|
[JsonPropertyName("monitor_refresh_delay")]
|
|
public int MonitorRefreshDelay { get; set; }
|
|
|
|
[JsonPropertyName("monitors")]
|
|
public List<MonitorInfo> Monitors { get; set; }
|
|
|
|
[JsonPropertyName("restore_settings_on_startup")]
|
|
public bool RestoreSettingsOnStartup { get; set; }
|
|
|
|
[JsonPropertyName("show_system_tray_icon")]
|
|
public bool ShowSystemTrayIcon { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to show the profile switcher button in the flyout UI.
|
|
/// Default is true. When false, the profile switcher is hidden (but profiles still work via Settings).
|
|
/// Note: Also hidden when no profiles exist.
|
|
/// </summary>
|
|
[JsonPropertyName("show_profile_switcher")]
|
|
public bool ShowProfileSwitcher { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to show the identify monitors button in the flyout UI.
|
|
/// Default is true.
|
|
/// </summary>
|
|
[JsonPropertyName("show_identify_monitors_button")]
|
|
public bool ShowIdentifyMonitorsButton { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets custom VCP value name mappings shared across all monitors.
|
|
/// Allows users to define custom names for color temperature presets and input sources.
|
|
/// </summary>
|
|
[JsonPropertyName("custom_vcp_mappings")]
|
|
public List<CustomVcpValueMapping> CustomVcpMappings { get; set; }
|
|
}
|
|
}
|