From c233e9af6b10b6d994ef765f29cc707bb7fc04b5 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 21 Dec 2024 12:44:46 +0100 Subject: [PATCH] Disable Gamut/ColorTemp controls for Disabled Visual Mode https://github.com/seerge/g-helper/discussions/3503 --- app/Settings.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Settings.cs b/app/Settings.cs index 19142c70..91703ead 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -410,6 +410,7 @@ public void InitVisual() comboVisual.SelectedValueChanged += ComboVisual_SelectedValueChanged; comboVisual.Visible = true; + VisualiseDisabled(); comboColorTemp.SelectedValueChanged += ComboVisual_SelectedValueChanged; comboColorTemp.Visible = true; @@ -454,6 +455,7 @@ private void ComboGamut_SelectedValueChanged(object? sender, EventArgs e) private void ComboVisual_SelectedValueChanged(object? sender, EventArgs e) { VisualControl.SetVisual((SplendidCommand)comboVisual.SelectedValue, (int)comboColorTemp.SelectedValue); + VisualiseDisabled(); } public void VisualiseBrightness() @@ -467,6 +469,11 @@ public void VisualiseBrightness() }); } + public void VisualiseDisabled() + { + comboGamut.Enabled = comboColorTemp.Enabled = (SplendidCommand)AppConfig.Get("visual") != SplendidCommand.Disabled; + } + public void VisualiseGamut() { Invoke(delegate