From 9c23cbd4488e4101cd157ebde07722ffb044bf1c Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Mon, 24 Nov 2025 20:22:36 +0100 Subject: [PATCH] More changes to the Settings page --- .../Settings.UI.Library/MonitorInfo.cs | 5 + .../SettingsXAML/Views/PowerDisplayPage.xaml | 88 ++--- .../Views/ProfileEditorDialog.xaml | 327 +++++------------- .../Settings.UI/Strings/en-us/Resources.resw | 2 +- 4 files changed, 126 insertions(+), 296 deletions(-) diff --git a/src/settings-ui/Settings.UI.Library/MonitorInfo.cs b/src/settings-ui/Settings.UI.Library/MonitorInfo.cs index 3e89ce4891..a0db813c46 100644 --- a/src/settings-ui/Settings.UI.Library/MonitorInfo.cs +++ b/src/settings-ui/Settings.UI.Library/MonitorInfo.cs @@ -2,6 +2,7 @@ // 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; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -71,6 +72,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library } } + public string MonitorIconGlyph => CommunicationMethod.Contains("WMI", StringComparison.OrdinalIgnoreCase) == true + ? "\uE7F8" // Laptop icon for WMI + : "\uE7F4"; // External monitor icon for DDC/CI and others + [JsonPropertyName("internalName")] public string InternalName { diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerDisplayPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerDisplayPage.xaml index b3a5a9c888..818ca3b354 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerDisplayPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/PowerDisplayPage.xaml @@ -46,65 +46,53 @@ - - - - - - - - - + + + + + - - - + + + + - - - - - - - + + + @@ -126,8 +114,10 @@ Margin="0,0,0,2" Description="{x:Bind InternalName, Mode=OneWay}" Header="{x:Bind Name}" - HeaderIcon="{ui:FontIcon Glyph=}" IsExpanded="False"> + + + @@ -203,14 +193,12 @@ - - + - - + + + 0 + 0 + 0,8,0,8 + @@ -29,264 +38,92 @@ Text="{x:Bind ViewModel.ProfileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + 0 + + - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index c1017c853a..eec4f0b152 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -5599,7 +5599,7 @@ To record a specific window, enter the hotkey with the Alt key in the opposite m Click a profile button to quickly apply saved monitor settings - Add Profile + Add profile Right-click a profile to rename or delete it