From 1d8aa26d1451b95b74b76184fc5b84ba64baa3da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Sun, 10 Apr 2011 20:22:20 +0000 Subject: [PATCH] Fixed the tree view row height on Linux. --- GUI/MainForm.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index 183ee23..991678f 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -90,8 +90,7 @@ namespace OpenHardwareMonitor.GUI { this.Font = SystemFonts.MessageBoxFont; treeView.Font = SystemFonts.MessageBoxFont; - plotPanel.Font = SystemFonts.MessageBoxFont; - treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 17); + plotPanel.Font = SystemFonts.MessageBoxFont; nodeCheckBox.IsVisibleValueNeeded += nodeCheckBox_IsVisibleValueNeeded; nodeCheckBox.CheckStateChanged += UpdatePlotSelection; @@ -121,6 +120,7 @@ namespace OpenHardwareMonitor.GUI { int p = (int)Environment.OSVersion.Platform; if ((p == 4) || (p == 128)) { // Unix + treeView.RowHeight = Math.Max(treeView.RowHeight, 17); splitContainer.BorderStyle = BorderStyle.None; splitContainer.Border3DStyle = Border3DStyle.Adjust; splitContainer.SplitterWidth = 4; @@ -129,6 +129,8 @@ namespace OpenHardwareMonitor.GUI { gadgetMenuItem.Visible = false; minCloseMenuItem.Visible = false; } else { // Windows + treeView.RowHeight = Math.Max(treeView.Font.Height + 1, 17); + gadget = new SensorGadget(computer, settings, unitManager); gadget.HideShowCommand += hideShowClick;