From 7b4a42d6b0c3c0d3ce9213e90ccf200d01c79f27 Mon Sep 17 00:00:00 2001 From: Codectory <61698721+Codectory@users.noreply.github.com> Date: Tue, 21 Dec 2021 01:29:18 +0100 Subject: [PATCH] 1.8.0 [New] - Change color depth (Nvidia users only) - Little UI overhaul [Changes] - Audio actions are disabled for now, because the implementation is really buggy [Bug fixes] -Application crashing after waking up from sleep mode #61 --- .../AutoHDR.Displays/DisplayManagerNvidia.cs | 2 +- .../ProjectLocales.Designer.cs | 6 +- .../ProjectLocales.de.resx | 4 +- .../ProjectLocales.resx | 4 +- Source/AutoHDR/App.xaml | 424 ++---------------- Source/AutoHDR/AutoHDR.csproj | 17 +- Source/AutoHDR/Controls/Colors.xaml | 37 ++ .../AutoHDR/Controls/ControlProperties.xaml | 8 + Source/AutoHDR/Controls/CustomComboBox.xaml | 165 +++++++ Source/AutoHDR/Controls/DefaultBorder.xaml | 24 + Source/AutoHDR/ProcessWatcher.cs | 2 + .../AutoHDR/Profiles/Actions/DisplayAction.cs | 2 + Source/AutoHDR/Properties/AssemblyInfo.cs | 4 +- Source/AutoHDR/Views/AutoHDRMainView.xaml | 18 +- Source/AutoHDR/Views/DisplayActionView.xaml | 13 +- Source/AutoHDR/Views/ProfileManagerView.xaml | 6 +- Source/Externals/CodectoryCore.UI.Wpf.dll | Bin 40960 -> 37888 bytes 17 files changed, 327 insertions(+), 409 deletions(-) create mode 100644 Source/AutoHDR/Controls/Colors.xaml create mode 100644 Source/AutoHDR/Controls/ControlProperties.xaml create mode 100644 Source/AutoHDR/Controls/CustomComboBox.xaml create mode 100644 Source/AutoHDR/Controls/DefaultBorder.xaml diff --git a/Source/AutoHDR.Displays/DisplayManagerNvidia.cs b/Source/AutoHDR.Displays/DisplayManagerNvidia.cs index e7fb8ea..121ec46 100644 --- a/Source/AutoHDR.Displays/DisplayManagerNvidia.cs +++ b/Source/AutoHDR.Displays/DisplayManagerNvidia.cs @@ -105,7 +105,7 @@ public override void SetColorDepth(Display display, ColorDepth colorDepth) { DisplayDevice nvidiaDisplay = new DisplayDevice((uint)display.Tag); NvAPIWrapper.Native.Display.ColorDataDepth nvColorDepth = colorDepth.ConvertNvidiaColorDepth(); - ColorData colorData = new ColorData(nvidiaDisplay.CurrentColorData.ColorFormat, nvidiaDisplay.CurrentColorData.Colorimetry, nvidiaDisplay.CurrentColorData.DynamicRange, NvAPIWrapper.Native.Display.ColorDataDepth.BPC8, nvidiaDisplay.CurrentColorData.SelectionPolicy, nvidiaDisplay.CurrentColorData.DesktopColorDepth); + ColorData colorData = new ColorData(nvidiaDisplay.CurrentColorData.ColorFormat, nvidiaDisplay.CurrentColorData.Colorimetry, nvidiaDisplay.CurrentColorData.DynamicRange, nvColorDepth, nvidiaDisplay.CurrentColorData.SelectionPolicy, nvidiaDisplay.CurrentColorData.DesktopColorDepth); nvidiaDisplay.SetColorData(colorData); } diff --git a/Source/AutoHDR.ProjectResources/ProjectLocales.Designer.cs b/Source/AutoHDR.ProjectResources/ProjectLocales.Designer.cs index e0a4804..cc7e9b1 100644 --- a/Source/AutoHDR.ProjectResources/ProjectLocales.Designer.cs +++ b/Source/AutoHDR.ProjectResources/ProjectLocales.Designer.cs @@ -638,11 +638,11 @@ public static string IsPrimaryMonitor { } /// - /// Sucht eine lokalisierte Zeichenfolge, die Last action ähnelt. + /// Sucht eine lokalisierte Zeichenfolge, die Last actions ähnelt. /// - public static string LastAction { + public static string LastActions { get { - return ResourceManager.GetString("LastAction", resourceCulture); + return ResourceManager.GetString("LastActions", resourceCulture); } } diff --git a/Source/AutoHDR.ProjectResources/ProjectLocales.de.resx b/Source/AutoHDR.ProjectResources/ProjectLocales.de.resx index d343009..96aa8ce 100644 --- a/Source/AutoHDR.ProjectResources/ProjectLocales.de.resx +++ b/Source/AutoHDR.ProjectResources/ProjectLocales.de.resx @@ -276,8 +276,8 @@ Hauptmonitor - - Letzte Aktion + + Letzte Aktionen Starte Anwendung diff --git a/Source/AutoHDR.ProjectResources/ProjectLocales.resx b/Source/AutoHDR.ProjectResources/ProjectLocales.resx index bea65c2..a7f734a 100644 --- a/Source/AutoHDR.ProjectResources/ProjectLocales.resx +++ b/Source/AutoHDR.ProjectResources/ProjectLocales.resx @@ -310,8 +310,8 @@ Primary - - Last action + + Last actions Launch application diff --git a/Source/AutoHDR/App.xaml b/Source/AutoHDR/App.xaml index d705f0c..dad9762 100644 --- a/Source/AutoHDR/App.xaml +++ b/Source/AutoHDR/App.xaml @@ -14,51 +14,18 @@ StartupUri="Views\AutoHDRMainView.xaml"> - https://paypal.me/HeikoH89 + + + + + + + + https://paypal.me/HeikoH89 https://github.com/Codectory/AutoHDR - #2ac987 - #ff6666 - #fa8e8e - #e36b6b - - White - #fca9a9 - #FFDDDDDD - White - #FFCCCCCC - #FF444444 - #cfcfcf - #8a8a8a - - #FF888888 - - - - 15 - - - - - - - - - - - - #ad7b7b - #757575 - #969696 - #a1a1a1 - - #c6cbcf - - - 5 - 5 - - - - + + + + + \ No newline at end of file diff --git a/Source/AutoHDR/ProcessWatcher.cs b/Source/AutoHDR/ProcessWatcher.cs index 69c21e5..1de0ce8 100644 --- a/Source/AutoHDR/ProcessWatcher.cs +++ b/Source/AutoHDR/ProcessWatcher.cs @@ -197,6 +197,8 @@ private void UpdateApplications() private bool IsFocusedApplication(Process process) { Process currentProcess = GetForegroundProcess(); + if (currentProcess == null) + return false; return process.Id.Equals(currentProcess.Id); } diff --git a/Source/AutoHDR/Profiles/Actions/DisplayAction.cs b/Source/AutoHDR/Profiles/Actions/DisplayAction.cs index abb35c5..c196cad 100644 --- a/Source/AutoHDR/Profiles/Actions/DisplayAction.cs +++ b/Source/AutoHDR/Profiles/Actions/DisplayAction.cs @@ -104,6 +104,8 @@ public override string ActionDescription returnValue += $" {ProjectLocales.Resolution} {Resolution.Width}x{Resolution.Height}"; if (SetRefreshRate) returnValue += $" {ProjectLocales.RefreshRate} {RefreshRate}Hz"; + if (SetColorDepth) + returnValue += $" {ProjectLocales.ColorDepth} {ColorDepth}"; return returnValue; } } diff --git a/Source/AutoHDR/Properties/AssemblyInfo.cs b/Source/AutoHDR/Properties/AssemblyInfo.cs index c0b38c5..1a23215 100644 --- a/Source/AutoHDR/Properties/AssemblyInfo.cs +++ b/Source/AutoHDR/Properties/AssemblyInfo.cs @@ -52,5 +52,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.22.0")] -[assembly: AssemblyFileVersion("1.7.22.0")] +[assembly: AssemblyVersion("1.8.0.0")] +[assembly: AssemblyFileVersion("1.8.0.0")] diff --git a/Source/AutoHDR/Views/AutoHDRMainView.xaml b/Source/AutoHDR/Views/AutoHDRMainView.xaml index ca0b456..46be28e 100644 --- a/Source/AutoHDR/Views/AutoHDRMainView.xaml +++ b/Source/AutoHDR/Views/AutoHDRMainView.xaml @@ -32,8 +32,9 @@ - - + + + @@ -41,9 +42,7 @@ - - - + @@ -92,7 +91,7 @@ - + @@ -146,7 +145,7 @@ - + @@ -157,9 +156,10 @@ - - + + + diff --git a/Source/AutoHDR/Views/DisplayActionView.xaml b/Source/AutoHDR/Views/DisplayActionView.xaml index e05ed53..c6721a1 100644 --- a/Source/AutoHDR/Views/DisplayActionView.xaml +++ b/Source/AutoHDR/Views/DisplayActionView.xaml @@ -34,14 +34,14 @@ diff --git a/Source/AutoHDR/Views/ProfileManagerView.xaml b/Source/AutoHDR/Views/ProfileManagerView.xaml index 89eb4f2..cff0411 100644 --- a/Source/AutoHDR/Views/ProfileManagerView.xaml +++ b/Source/AutoHDR/Views/ProfileManagerView.xaml @@ -50,8 +50,8 @@ -