Skip to content

Commit

Permalink
Tooltip adjustments + bug fixes
Browse files Browse the repository at this point in the history
- Add (almost) all missing tooltips

- Change some existing tooltips and messages

- Remove an unused message

- (attempt to) Fix slightly misaligned fan curve sliders
  • Loading branch information
Sparronator9999 committed Dec 17, 2024
1 parent b109276 commit e63e3a3
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 44 deletions.
32 changes: 25 additions & 7 deletions YAMDCC.ConfigEditor/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,20 @@ public MainWindow()
Margin = new Padding(2),
Tag = i,
};
ttMain.SetToolTip(numFanSpds[i], Strings.GetString("ttFanSpd"));
numFanSpds[i].ValueChanged += numFanSpd_Changed;
tblCurve.Controls.Add(numFanSpds[i], i + 1, 0);

tbFanSpds[i] = new TrackBar()
{
Dock = DockStyle.Fill,
Margin = new Padding((int)(9 * scale), 0, (int)(9 * scale), 0),
Orientation = Orientation.Vertical,
Tag = i,
TickFrequency = 5,
TickStyle = TickStyle.Both,
};
ttMain.SetToolTip(tbFanSpds[i], Strings.GetString("ttFanSpdTB"));
tbFanSpds[i].ValueChanged += tbFanSpd_Scroll;
tblCurve.Controls.Add(tbFanSpds[i], i + 1, 1);

Expand All @@ -124,6 +127,7 @@ public MainWindow()
Margin = new Padding(2),
Tag = i - 1,
};
ttMain.SetToolTip(numUpTs[i - 1], Strings.GetString("ttUpT"));
numUpTs[i - 1].ValueChanged += numUpT_Changed;
tblCurve.Controls.Add(numUpTs[i - 1], i + 1, 2);
}
Expand All @@ -149,6 +153,7 @@ public MainWindow()
Margin = new Padding(2),
Tag = i,
};
ttMain.SetToolTip(numDownTs[i], Strings.GetString("ttDownT"));
numDownTs[i].ValueChanged += numDownT_Changed;
tblCurve.Controls.Add(numDownTs[i], i + 1, 3);
}
Expand Down Expand Up @@ -207,9 +212,16 @@ private void MainWindow_Load(object sender, EventArgs e)

LoadConf(Paths.CurrentConfig);

if (Config is not null && Config.KeyLightConf is not null)
if (Config is not null)
{
SendServiceMessage(new ServiceCommand(Command.GetKeyLightBright, ""));
if (Config.KeyLightConf is null)
{
ttMain.SetToolTip(tbKeyLight, Strings.GetString("ttNotSupported"));
}
else
{
SendServiceMessage(new ServiceCommand(Command.GetKeyLightBright, ""));
}
}

if (File.Exists(Paths.ECToConfFail))
Expand Down Expand Up @@ -312,6 +324,7 @@ private void IPC_MessageReceived(object sender, PipeMessageEventArgs<ServiceResp
tbKeyLight.Maximum = Config.KeyLightConf.MaxVal - Config.KeyLightConf.MinVal;
tbKeyLight.Value = value;
tbKeyLight.Enabled = lblKeyLight.Enabled = true;
ttMain.SetToolTip(tbKeyLight, Strings.GetString("ttKeyLight"));
}));
}
break;
Expand Down Expand Up @@ -436,7 +449,8 @@ private void tsiProfChangeDesc_Click(object sender, EventArgs e)
if (dlg.ShowDialog() == DialogResult.OK)
{
curveCfg.Desc = dlg.Result;
ttMain.SetToolTip(cboProfSel, dlg.Result);
ttMain.SetToolTip(cboProfSel, Strings.GetString(
"ttProfSel", dlg.Result));
btnRevert.Enabled = tsiRevert.Enabled = true;
}
}
Expand Down Expand Up @@ -567,7 +581,8 @@ private void cboProfSel_IndexChanged(object sender, EventArgs e)
FanCurveConf curveConfig = config.FanCurveConfs[cboProfSel.SelectedIndex];

config.CurveSel = cboProfSel.SelectedIndex;
ttMain.SetToolTip(cboProfSel, config.FanCurveConfs[config.CurveSel].Desc);
ttMain.SetToolTip(cboProfSel, Strings.GetString(
"ttProfSel", config.FanCurveConfs[config.CurveSel].Desc));

int numTempThresholds = config.UpThresholdRegs.Length;

Expand Down Expand Up @@ -686,8 +701,10 @@ private void cboPerfMode_IndexChanged(object sender, EventArgs e)
{
if (Config is not null)
{
Config.PerfModeConf.ModeSel = cboPerfMode.SelectedIndex;
ttMain.SetToolTip(cboPerfMode, Config.PerfModeConf.PerfModes[cboPerfMode.SelectedIndex].Desc);
int idx = cboPerfMode.SelectedIndex;
Config.PerfModeConf.ModeSel = idx;
ttMain.SetToolTip(cboPerfMode,
Strings.GetString("ttPerfMode", Config.PerfModeConf.PerfModes[idx].Desc));
btnRevert.Enabled = tsiRevert.Enabled = true;
}
}
Expand Down Expand Up @@ -828,7 +845,8 @@ private void LoadConf(YAMDCC_Config config)
}

cboPerfMode.SelectedIndex = cfg.ModeSel;
ttMain.SetToolTip(cboPerfMode, cfg.PerfModes[cfg.ModeSel].Desc);
ttMain.SetToolTip(cboPerfMode, Strings.GetString(
"ttPerfMode", cfg.PerfModes[cfg.ModeSel].Desc));
cboPerfMode.Enabled = lblPerfMode.Enabled = true;
}

Expand Down
113 changes: 76 additions & 37 deletions YAMDCC.ConfigEditor/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Details (provide this when reporting bugs):
{0}</value>
</data>
<data name="svcErrorCrash" xml:space="preserve">
<value>The YAMDCC Service crashed while starting.
<value>The YAMDCC service crashed while starting.
Check the Event viewer and service log for crash details.</value>
</data>
<data name="svcErrorStart" xml:space="preserve">
Expand All @@ -178,9 +178,8 @@ Details (provide this when reporting bugs):
</data>
<data name="svcInstallFail" xml:space="preserve">
<value>The service failed to install.
Try running the YAMDCC configurator again, and if the
service installation fails again, open a bug report with
this error.</value>

Try running the YAMDCC config editor again, and if the service installation fails again, open a bug report with this error.</value>
</data>
<data name="svcNotFound" xml:space="preserve">
<value>The YAMDCC Service is not installed.
Expand All @@ -190,83 +189,86 @@ Additionally, the executable for the YAMDCC Service (yamdccsvc.exe) was not foun
Try re-installing/re-downloading YAMDCC to fix this.</value>
</data>
<data name="svcNotInstalled" xml:space="preserve">
<value>The YAMDCC Service is not installed yet.
<value>The YAMDCC service is not installed yet.
Would you like to install it now?</value>
</data>
<data name="svcNotRunning" xml:space="preserve">
<value>The YAMDCC Service is currently not running.
<value>The YAMDCC service is currently not running.
Would you like to start it now?
(Clicking "No" will quit the program.)</value>
</data>
<data name="ttAbout" xml:space="preserve">
<value>Show information about this program, including
copyright and licensing information.</value>
version, copyright and licensing information.</value>
</data>
<data name="ttApply" xml:space="preserve">
<value>Applies the currently loaded config to the system.</value>
</data>
<data name="ttChgLim" xml:space="preserve">
<value>Llimits the charge percentage of the battery in this laptop to the specified percentage.
<value>Set to anything other than "0" (i.e. 1-100) to limit the charge
level of your laptop's battery to the specified percentage.
Set to "0" to disable this feature.</value>
</data>
<data name="ttECMon" xml:space="preserve">
<value>When enabled, prints information about the fan speed and RPM,
and the temperature of the component being cooled by the fan.</value>
<value>When enabled, information about the fan speed and RPM, and the temperature
of the component being cooled by the fan (e.g. CPU) to the status bar.</value>
</data>
<data name="ttExit" xml:space="preserve">
<value>Click to quit YAMDCC.
The YAMDCC service will continue to run in the background.</value>
</data>
<data name="ttFanSel" xml:space="preserve">
<value>The fan to adjust a fan curve for.
Depending on your laptop, there may be multiple fans listed here,
even if your laptop only has one physical fan installed.</value>
<value>The fan to adjust a fan profile for.
Depending on your laptop, there may be multiple "virtual" fans
listed here, even if your laptop only has one physical fan.</value>
</data>
<data name="ttFullBlast" xml:space="preserve">
<value>Sets all fans to full blast while checked.</value>
<value>Check to set all fans to full blast.</value>
</data>
<data name="ttKeySwap" xml:space="preserve">
<value>Swaps the Windows and Fn keys while checked.</value>
<value>Check to swap the Windows and Fn keys' functions.</value>
</data>
<data name="ttLoadConf" xml:space="preserve">
<value>Loads an XML config to edit or apply.</value>
<value>Click to load an XML config to edit or apply.</value>
</data>
<data name="ttNotSupported" xml:space="preserve">
<value>This feature is not supported by your system.</value>
</data>
<data name="ttProfAdd" xml:space="preserve">
<value>Creates a new fan profile with the currently selected fan profile's settings.</value>
<value>Click to create a new fan profile with the currently selected profile's settings.</value>
</data>
<data name="ttProfChangeDesc" xml:space="preserve">
<value>Changes the currently selected fan profile's description
A dialog will open, in which you can enter the fan profile's new description.</value>
<value>Click to change the currently selected fan profile's description.</value>
</data>
<data name="ttProfDel" xml:space="preserve">
<value>Deletes the currently selected fan profile.</value>
<value>Click to delete the currently selected fan profile.</value>
</data>
<data name="ttProfRename" xml:space="preserve">
<value>Changes the name of the currently selected fan profile.
A dialog will open, in which you can enter the fan profile's new name.</value>
<value>Click to change the currently selected fan profile's name.</value>
</data>
<data name="ttProfSel" xml:space="preserve">
<value>The fan profile to adjust for the current fan.</value>
<value>The fan profile to apply to the currently selected fan.

Profile description:
{0}</value>
</data>
<data name="ttRevert" xml:space="preserve">
<value>Revert the currently loaded config to when it was first loaded
<value>Click to revert the currently loaded config to when it was first loaded
using "Load Config", or saved using "Save Config", whichever came last.</value>
</data>
<data name="ttSaveConf" xml:space="preserve">
<value>Saves the currently loaded config to an XML file.</value>
<value>Click to save the currently loaded config to an XML file.</value>
</data>
<data name="ttSource" xml:space="preserve">
<value>Go to the GitHub page for this project.</value>
<value>Click to go to this project's GitHub page.</value>
</data>
<data name="ttSvcStop" xml:space="preserve">
<value>Stops the YAMDCC service, and quits the YAMDCC configurator.</value>
<value>Click to stop the YAMDCC service.
This will also quit the YAMDCC config editor (this program).</value>
</data>
<data name="ttSvcUninstall" xml:space="preserve">
<value>Uninstalls the YAMDCC service and quits the YAMDCC configurator.
Only run if you want to uninstall YAMDCC or move its program files to another location.</value>
<value>Click to uninstall the YAMDCC service (and quit the YAMDCC config editor).
Only do this if you want to uninstall YAMDCC or move its program files to another location.</value>
</data>
<data name="dlgSvcUninstallError" xml:space="preserve">
<value>Failed to uninstall the YAMDCC service!</value>
Expand Down Expand Up @@ -307,11 +309,6 @@ Please re-run this program as Administrator
<data name="statNoConf" xml:space="preserve">
<value>Please load a config to start</value>
</data>
<data name="dlgTemplateConfWIP" xml:space="preserve">
<value>This is a template config.
Template configs are currently a WIP and cannot be used yet.
Please load a different config.</value>
</data>
<data name="statSvcTimeout" xml:space="preserve">
<value>WARN: Service has not responded for a while. Try restarting YAMDCC.</value>
</data>
Expand All @@ -323,8 +320,8 @@ You will need to reboot your computer so that the fan settings are reset to thei
<data name="dlgECtoConfError" xml:space="preserve">
<value>An error occurred while fetching your laptop's default fan curves.

This is probably a bug; please report this on YAMDCC's issue tracker,
including the log folder (located at {0}).</value>
This is probably a bug; please report this to YAMDCC's issue tracker, including the log folder
(located at {0}).</value>
</data>
<data name="dlgECtoConfSuccess" xml:space="preserve">
<value>Your laptop's default fan curves have been saved to the currently applied config successfully.
Expand All @@ -340,4 +337,46 @@ Cancel and continue loading YAMDCC?</value>
<value>Copyright © Sparronator9999 (and contributors), 2023-2024.
YAMDCC and its authors are not affiliated with Micro-Star International Co., Ltd. in any way, shape, or form.</value>
</data>
</root>
<data name="ttUpT" xml:space="preserve">
<value>This is the temperature that the component being cooled by
this fan must warm up to before the fan speeds up.

Recommended values:
If your lowest fan speed is set to 0% (off), start at ~45-50°C,
otherwise start higher (~50-55°C).
Keep increasing to around 75-90°C for the highest up threshold.</value>
</data>
<data name="ttDownT" xml:space="preserve">
<value>This is the temperature that the component being cooled by
this fan must cool down to before the fan slows down.

Recommended values:
Set every down threshold to ~3°C below the next up threshold
(i.e. the one diagonally up and to the right of this down threshold).
Increase the gap (e.g. to 5°C) if your fan often cycles on and off
or between two speeds while idling.</value>
</data>
<data name="ttFanSpdTB" xml:space="preserve">
<value>Placeholder (fan speed (trackbar))</value>
</data>
<data name="ttFanSpd" xml:space="preserve">
<value>This is the fan speed that the fan will run at when the component's
temperature is between the up and down thresholds below.

Recommended values:
To turn the fan off at idle, set the lowest fan speed to 0%.
Start at ~30-40% for the next speed up (depending on your laptop),
increasing to (or close to) 100% for the highest setting.</value>
</data>
<data name="ttKeyLight" xml:space="preserve">
<value>Drag to the right to increase your laptop's keyboard backlight
brightness, or drag left to decrease it (or turn it off).</value>
</data>
<data name="ttPerfMode" xml:space="preserve">
<value>Select the performance mode of your laptop here.
Note that this is different from Windows' power plans.

Performance mode description:
{0}</value>
</data>
</root>

0 comments on commit e63e3a3

Please sign in to comment.