Fixed issue with HUD background when not displaying anything.
Fixed issue with HUD background when not displaying anything.

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -15,6 +15,7 @@
     Added: Readout help strings by ClassyJakey.
 
     Fixed: Issue with separators in HUDs.
+    Fixed: Issue with HUDs with backgrounds that have no displayed lines.
 
     Padishar's Fixes:
         Fixed: Issue with multicouplers when attached to parent by bottom node.

--- a/KerbalEngineer/Flight/Readouts/ReadoutModule.cs
+++ b/KerbalEngineer/Flight/Readouts/ReadoutModule.cs
@@ -89,6 +89,11 @@
         public bool IsDefault { get; set; }
 
         /// <summary>
+        ///     Gets the number of drawn lines.
+        /// </summary>
+        public int LineCount { get; private set; }
+
+        /// <summary>
         ///     Gets and sets the message style.
         /// </summary>
         public GUIStyle MessageStyle { get; set; }
@@ -139,6 +144,7 @@
 
         public void LineCountEnd()
         {
+            this.LineCount = this.lineCountEnd;
             if (this.lineCountEnd.CompareTo(this.lineCountStart) < 0)
             {
                 this.ResizeRequested = true;

--- a/KerbalEngineer/Flight/Sections/SectionModule.cs
+++ b/KerbalEngineer/Flight/Sections/SectionModule.cs
@@ -168,6 +168,11 @@
         public bool IsVisible { get; set; }
 
         /// <summary>
+        ///     Gets the number of drawn readout lines.
+        /// </summary>
+        public int LineCount { get; private set; }
+
+        /// <summary>
         ///     Gets and sets the name of the section.
         /// </summary>
         public string Name { get; set; }
@@ -351,6 +356,7 @@
                 GUILayout.BeginVertical(this.boxStyle);
             }
 
+            this.LineCount = 0;
             if (this.ReadoutModules.Count > 0)
             {
                 foreach (var readout in this.ReadoutModules)
@@ -358,11 +364,13 @@
                     readout.LineCountStart();
                     readout.Draw(this);
                     readout.LineCountEnd();
+                    this.LineCount += readout.LineCount;
                 }
             }
             else
             {
                 GUILayout.Label("No readouts are installed.", this.messageStyle);
+                this.LineCount = 1;
             }
 
             if (!this.IsHud)

--- a/KerbalEngineer/Flight/Sections/SectionWindow.cs
+++ b/KerbalEngineer/Flight/Sections/SectionWindow.cs
@@ -60,8 +60,8 @@
 
         #region Fields
 
+        private GUIStyle hudWindowBgStyle;
         private GUIStyle hudWindowStyle;
-        private GUIStyle hudWindowBgStyle;
         private GUIStyle windowStyle;
 
         #endregion
@@ -130,9 +130,11 @@
                 this.resizeRequested = false;
             }
             GUI.skin = null;
-            this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, string.Empty, 
-                (!this.ParentSection.IsHud || this.ParentSection.IsEditorVisible) ? this.windowStyle 
-                : this.ParentSection.IsHudBackground ? this.hudWindowBgStyle : this.hudWindowStyle).ClampToScreen();
+            this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, string.Empty,
+                                                   (!this.ParentSection.IsHud || this.ParentSection.IsEditorVisible) ? this.windowStyle
+                                                       : this.ParentSection.IsHudBackground && this.ParentSection.LineCount > 0
+                                                           ? this.hudWindowBgStyle
+                                                           : this.hudWindowStyle).ClampToScreen();
             this.ParentSection.FloatingPositionX = this.windowPosition.x;
             this.ParentSection.FloatingPositionY = this.windowPosition.y;
         }

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ