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:
Michael Möller
2011-05-15 20:48:52 +00:00
parent 0fb52a4723
commit 58fcb67dcd
4 changed files with 33 additions and 22 deletions

View File

@@ -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);
}
}
}
}