From 6ed8ff28954f842fac2221dc664f6661b68ad6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Sat, 15 May 2010 10:48:28 +0000 Subject: [PATCH] Fixed Issue 57. --- GUI/MainForm.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index 6a544fd..1e4c9b4 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -96,7 +96,12 @@ namespace OpenHardwareMonitor.GUI { Width = Utilities.Config.Get("mainForm.Width", Width); Height = Utilities.Config.Get("mainForm.Height", Height); - + + foreach (TreeColumn column in treeView.Columns) + column.Width = Math.Max(20, Math.Min(400, + Config.Get("treeView.Columns." + column.Header + ".Width", + column.Width))); + treeModel = new TreeModel(); root = new Node(System.Environment.MachineName); root.Image = Utilities.EmbeddedResources.GetImage("computer.png"); @@ -267,6 +272,10 @@ namespace OpenHardwareMonitor.GUI { Config.Set("mainForm.Height", Height); } + foreach (TreeColumn column in treeView.Columns) + Config.Set("treeView.Columns." + column.Header + ".Width", + column.Width); + timer.Enabled = false; sensorSystemTray.Dispose();