mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-01 06:45:12 +00:00
Added some GUI improvements: Better handling of the row selection, minimal row spacing of 18 pixel (to get nice dotted lines) and 3 decimal digits for voltages. Also changed the tree view font rendering to get better quality without ClearType.
This commit is contained in:
@@ -120,7 +120,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
|
||||
int p = (int)Environment.OSVersion.Platform;
|
||||
if ((p == 4) || (p == 128)) { // Unix
|
||||
treeView.RowHeight = Math.Max(treeView.RowHeight, 17);
|
||||
treeView.RowHeight = Math.Max(treeView.RowHeight, 18);
|
||||
splitContainer.BorderStyle = BorderStyle.None;
|
||||
splitContainer.Border3DStyle = Border3DStyle.Adjust;
|
||||
splitContainer.SplitterWidth = 4;
|
||||
@@ -131,7 +131,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
minTrayMenuItem.Visible = false;
|
||||
startMinMenuItem.Visible = false;
|
||||
} else { // Windows
|
||||
treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 17);
|
||||
treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 18);
|
||||
|
||||
gadget = new SensorGadget(computer, settings, unitManager);
|
||||
gadget.HideShowCommand += hideShowClick;
|
||||
@@ -627,5 +627,11 @@ namespace OpenHardwareMonitor.GUI {
|
||||
// restore the MainIcon setting
|
||||
systemTray.IsMainIconEnabled = minimizeToTray.Value;
|
||||
}
|
||||
|
||||
private void treeView_MouseMove(object sender, MouseEventArgs e) {
|
||||
if ((e.Button & (MouseButtons.Left | MouseButtons.Right)) > 0) {
|
||||
treeView.SelectedNode = treeView.GetNodeAt(e.Location);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user