mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
GPU Section UI fixes
This commit is contained in:
@@ -31,7 +31,7 @@ public static class HardwareControl
|
||||
{
|
||||
AppConfig.setConfig("fan_max", fan);
|
||||
}
|
||||
private static string FormatFan(int fan)
|
||||
public static string FormatFan(int fan)
|
||||
{
|
||||
// fix for old models
|
||||
if (fan < 0)
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace GHelper
|
||||
private bool customFans = false;
|
||||
private int customPower = 0;
|
||||
|
||||
bool isGpuSection = true;
|
||||
|
||||
public SettingsForm()
|
||||
{
|
||||
|
||||
@@ -256,6 +258,8 @@ namespace GHelper
|
||||
|
||||
contextMenuStrip.Items.Add("-");
|
||||
|
||||
if (isGpuSection)
|
||||
{
|
||||
var titleGPU = new ToolStripMenuItem(Properties.Strings.GPUMode);
|
||||
titleGPU.Margin = padding;
|
||||
titleGPU.Enabled = false;
|
||||
@@ -282,6 +286,8 @@ namespace GHelper
|
||||
contextMenuStrip.Items.Add(menuOptimized);
|
||||
|
||||
contextMenuStrip.Items.Add("-");
|
||||
}
|
||||
|
||||
|
||||
var quit = new ToolStripMenuItem(Properties.Strings.Quit);
|
||||
quit.Click += ButtonQuit_Click;
|
||||
@@ -1470,8 +1476,9 @@ namespace GHelper
|
||||
|
||||
if (eco < 0)
|
||||
{
|
||||
tableGPU.Visible = false;
|
||||
if (Program.acpi.DeviceGet(AsusACPI.GPU_Fan) < -65536) panelGPU.Visible = false;
|
||||
isGpuSection = tableGPU.Visible = false;
|
||||
SetContextMenu();
|
||||
if (HardwareControl.FormatFan(Program.acpi.DeviceGet(AsusACPI.GPU_Fan)) is null) panelGPU.Visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user