Button to download Color Profiles

This commit is contained in:
Serge
2024-03-10 17:04:44 +01:00
parent b1f6754dae
commit 8ec97da829
8 changed files with 662 additions and 49 deletions

View File

@@ -276,12 +276,31 @@ namespace GHelper
sliderGamma.ValueChanged += SliderGamma_ValueChanged;
}
var gamuts = VisualControl.GetGamutModes();
if (gamuts.Count < 1) return;
if (!dimming) labelGammaTitle.Text = "Visual Mode";
else labelGammaTitle.Text += " / Visual";
var gamuts = VisualControl.GetGamutModes();
if (gamuts.Count < 1)
{
if (ColorProfileHelper.ProfileExists())
{
tableVisual.ColumnCount = 2;
buttonInstallColor.Text = "Download Color Profile(s)";
buttonInstallColor.Visible = true;
buttonInstallColor.Click += ButtonInstallColorProfile_Click;
panelGamma.Visible = true;
tableVisual.Visible = true;
}
return;
} else
{
tableVisual.ColumnCount = 3;
buttonInstallColor.Visible = false;
}
panelGamma.Visible = true;
tableVisual.Visible = true;
@@ -321,6 +340,12 @@ namespace GHelper
}
private async void ButtonInstallColorProfile_Click(object? sender, EventArgs e)
{
await ColorProfileHelper.InstallProfile();
InitVisual();
}
private void ComboGamut_SelectedValueChanged(object? sender, EventArgs e)
{
AppConfig.Set("gamut", (int)comboGamut.SelectedValue);