Fixed Issue 178.

This commit is contained in:
Michael Möller 2011-03-17 20:16:01 +00:00
parent ca1f45475d
commit 6eafde204e

View File

@ -363,8 +363,9 @@ namespace OpenHardwareMonitor.GUI {
}
y += pair.Value.Count * sensorLineHeight;
}
if (sensors.Count == 0)
y += 4 * sensorLineHeight + hardwareLineHeight;
y += bottomMargin;
y = Math.Max(y, topBorder + hardwareLineHeight + bottomBorder);
this.Size = new Size(width, y);
}
@ -426,7 +427,9 @@ namespace OpenHardwareMonitor.GUI {
if (sensors.Count == 0) {
x = leftBorder + 1;
g.DrawString("Add a sensor ...", smallFont, Brushes.White,
g.DrawString("Right-click on a sensor in the main window and select " +
"\"Show in Gadget\" to show the sensor here.",
smallFont, Brushes.White,
new Rectangle(x, y - 1, w - rightBorder - x, 0));
}