mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Allow clicking on visual-modes label to enable them again
This commit is contained in:
@@ -40,6 +40,8 @@ namespace GHelper.Display
|
|||||||
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
|
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200);
|
||||||
|
|
||||||
public const int DefaultColorTemp = 50;
|
public const int DefaultColorTemp = 50;
|
||||||
|
|
||||||
|
public static bool forceVisual = false;
|
||||||
static VisualControl()
|
static VisualControl()
|
||||||
{
|
{
|
||||||
brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed;
|
brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed;
|
||||||
@@ -129,8 +131,8 @@ namespace GHelper.Display
|
|||||||
if (mode == SplendidCommand.None) return;
|
if (mode == SplendidCommand.None) return;
|
||||||
if (mode == SplendidCommand.Default && init) return; // Skip default setting on init
|
if (mode == SplendidCommand.Default && init) return; // Skip default setting on init
|
||||||
|
|
||||||
if (ScreenCCD.GetHDRStatus(true)) return;
|
if (!forceVisual && ScreenCCD.GetHDRStatus(true)) return;
|
||||||
if (ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return;
|
if (!forceVisual && ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return;
|
||||||
|
|
||||||
if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin();
|
if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin();
|
||||||
|
|
||||||
|
|||||||
1
app/Settings.Designer.cs
generated
1
app/Settings.Designer.cs
generated
@@ -1714,6 +1714,7 @@ namespace GHelper
|
|||||||
labelVisual.TabIndex = 42;
|
labelVisual.TabIndex = 42;
|
||||||
labelVisual.Text = "Visual Modes are not available when HDR is active";
|
labelVisual.Text = "Visual Modes are not available when HDR is active";
|
||||||
labelVisual.Visible = false;
|
labelVisual.Visible = false;
|
||||||
|
labelVisual.Cursor = Cursors.Hand;
|
||||||
//
|
//
|
||||||
// tableVisual
|
// tableVisual
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -256,10 +256,17 @@ namespace GHelper
|
|||||||
VisualiseFnLock();
|
VisualiseFnLock();
|
||||||
buttonFnLock.Click += ButtonFnLock_Click;
|
buttonFnLock.Click += ButtonFnLock_Click;
|
||||||
|
|
||||||
|
labelVisual.Click += LabelVisual_Click;
|
||||||
|
|
||||||
panelPerformance.Focus();
|
panelPerformance.Focus();
|
||||||
InitVisual();
|
InitVisual();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LabelVisual_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
labelVisual.Visible = false;
|
||||||
|
VisualControl.forceVisual = true;
|
||||||
|
}
|
||||||
|
|
||||||
public void InitVisual()
|
public void InitVisual()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user