Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSerial.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSerial.cpp	(revision 10698)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSerial.cpp	(revision 10699)
@@ -41,8 +41,6 @@
 
     /* Setup constraints */
-    mLeIRQ->setMaximumWidth (mLeIRQ->fontMetrics().width ("888888"));
-    mLeIRQ->setMinimumWidth (mLeIRQ->minimumWidth());
-    mLeIOPort->setMaximumWidth (mLeIOPort->fontMetrics().width ("8888888"));
-    mLeIOPort->setMinimumWidth (mLeIOPort->minimumWidth());
+    mLeIRQ->setFixedWidth (mLeIRQ->fontMetrics().width ("8888"));
+    mLeIOPort->setFixedWidth (mLeIOPort->fontMetrics().width ("8888888"));
 
     /* Set initial values */
@@ -180,4 +178,5 @@
     KPortMode mode = vboxGlobal().toPortMode (aText);
     mCbPipe->setEnabled (mode == KPortMode_HostPipe);
+    mLbPath->setEnabled (mode != KPortMode_Disconnected);
     mLePath->setEnabled (mode != KPortMode_Disconnected);
     if (mValidator)
@@ -192,10 +191,7 @@
     /* TabWidget creation */
     mTabWidget = new QTabWidget (this);
-    mTabWidget->setSizePolicy (QSizePolicy::Expanding,
-                               QSizePolicy::Fixed);
     QVBoxLayout *layout = new QVBoxLayout (this);
     layout->setContentsMargins (0, 5, 0, 5);
     layout->addWidget (mTabWidget);
-    layout->addStretch();
 
     /* Applying language settings */
Index: /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSerial.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSerial.ui	(revision 10698)
+++ /trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSerial.ui	(revision 10699)
@@ -23,28 +23,60 @@
     <x>0</x>
     <y>0</y>
-    <width>379</width>
-    <height>163</height>
+    <width>357</width>
+    <height>179</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" >
-   <item>
-    <widget class="QGroupBox" name="mGbSerial" >
+  <layout class="QGridLayout" >
+   <item row="0" column="0" colspan="2" >
+    <widget class="QCheckBox" name="mGbSerial" >
      <property name="whatsThis" >
       <string>When checked, enables the given serial port of the virtual machine.</string>
      </property>
-     <property name="title" >
+     <property name="text" >
       <string>&amp;Enable Serial Port</string>
      </property>
-     <property name="checkable" >
+     <property name="checked" >
       <bool>true</bool>
      </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QWidget" native="1" name="mSerialChild" >
      <layout class="QGridLayout" >
+      <property name="leftMargin" >
+       <number>0</number>
+      </property>
       <property name="topMargin" >
-       <number>5</number>
+       <number>0</number>
+      </property>
+      <property name="rightMargin" >
+       <number>0</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>0</number>
       </property>
       <item row="0" column="0" >
        <widget class="QLabel" name="mLbNumber" >
         <property name="text" >
-         <string>Port &amp;Number</string>
+         <string>Port &amp;Number:</string>
+        </property>
+        <property name="alignment" >
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
         <property name="buddy" >
@@ -61,58 +93,70 @@
       </item>
       <item row="0" column="2" >
-       <layout class="QHBoxLayout" >
-        <item>
-         <widget class="QLabel" name="mLbIRQ" >
-          <property name="text" >
-           <string>&amp;IRQ</string>
-          </property>
-          <property name="buddy" >
-           <cstring>mLeIRQ</cstring>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLineEdit" name="mLeIRQ" >
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="whatsThis" >
-           <string>Displays the IRQ number of this serial port. Valid values are integer numbers in range from &lt;tt>0&lt;/tt> to &lt;tt>255&lt;/tt>. Values greater than &lt;tt>15&lt;/tt> may be used only if the &lt;b>IO APIC&lt;/b> is enabled for this virtual machine.</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
+       <widget class="QLabel" name="mLbIRQ" >
+        <property name="text" >
+         <string>&amp;IRQ:</string>
+        </property>
+        <property name="buddy" >
+         <cstring>mLeIRQ</cstring>
+        </property>
+       </widget>
       </item>
       <item row="0" column="3" >
-       <layout class="QHBoxLayout" >
-        <item>
-         <widget class="QLabel" name="mLbIOPort" >
-          <property name="text" >
-           <string>I/O Po&amp;rt</string>
-          </property>
-          <property name="buddy" >
-           <cstring>mLbIOPort</cstring>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLineEdit" name="mLeIOPort" >
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="whatsThis" >
-           <string>Displays the base I/O port address of this serial port. Valid values are integer numbers in range from &lt;tt>0&lt;/tt> to &lt;tt>0xFFFF&lt;/tt>.</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
+       <widget class="QLineEdit" name="mLeIRQ" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="whatsThis" >
+         <string>Displays the IRQ number of this serial port. Valid values are integer numbers in range from &lt;tt>0&lt;/tt> to &lt;tt>255&lt;/tt>. Values greater than &lt;tt>15&lt;/tt> may be used only if the &lt;b>IO APIC&lt;/b> is enabled for this virtual machine.</string>
+        </property>
+       </widget>
       </item>
       <item row="0" column="4" >
+       <widget class="QLabel" name="mLbIOPort" >
+        <property name="text" >
+         <string>I/O Po&amp;rt:</string>
+        </property>
+        <property name="buddy" >
+         <cstring>mLbIOPort</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="5" >
+       <widget class="QLineEdit" name="mLeIOPort" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="whatsThis" >
+         <string>Displays the base I/O port address of this serial port. Valid values are integer numbers in range from &lt;tt>0&lt;/tt> to &lt;tt>0xFFFF&lt;/tt>.</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QLabel" name="mLbMode" >
+        <property name="text" >
+         <string>Port &amp;Mode:</string>
+        </property>
+        <property name="alignment" >
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        </property>
+        <property name="buddy" >
+         <cstring>mCbMode</cstring>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QComboBox" name="mCbMode" >
+        <property name="whatsThis" >
+         <string>Controls the working mode of this serial port. If you select &lt;b>Disconnected&lt;/b>, the guest OS will detect the serial port but will not be able to operate it.</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2" colspan="4" >
        <spacer>
         <property name="orientation" >
@@ -121,5 +165,5 @@
         <property name="sizeHint" >
          <size>
-          <width>0</width>
+          <width>131</width>
           <height>20</height>
          </size>
@@ -127,22 +171,5 @@
        </spacer>
       </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="mLbMode" >
-        <property name="text" >
-         <string>Port &amp;Mode</string>
-        </property>
-        <property name="buddy" >
-         <cstring>mCbMode</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1" >
-       <widget class="QComboBox" name="mCbMode" >
-        <property name="whatsThis" >
-         <string>Controls the working mode of this serial port. If you select &lt;b>Disconnected&lt;/b>, the guest OS will detect the serial port but will not be able to operate it.</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2" colspan="2" >
+      <item row="2" column="1" colspan="2" >
        <widget class="QCheckBox" name="mCbPipe" >
         <property name="whatsThis" >
@@ -154,21 +181,11 @@
        </widget>
       </item>
-      <item row="1" column="4" >
-       <spacer>
-        <property name="orientation" >
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" >
-         <size>
-          <width>0</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="2" column="0" >
+      <item row="3" column="0" >
        <widget class="QLabel" name="mLbPath" >
         <property name="text" >
-         <string>Port &amp;Path</string>
+         <string>Port &amp;Path:</string>
+        </property>
+        <property name="alignment" >
+         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
         </property>
         <property name="buddy" >
@@ -177,5 +194,5 @@
        </widget>
       </item>
-      <item row="2" column="1" colspan="4" >
+      <item row="3" column="1" colspan="5" >
        <widget class="QLineEdit" name="mLePath" >
         <property name="whatsThis" >
@@ -183,24 +200,54 @@
         </property>
        </widget>
-      </item>
-      <item row="3" column="2" >
-       <spacer>
-        <property name="orientation" >
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" >
-         <size>
-          <width>20</width>
-          <height>0</height>
-         </size>
-        </property>
-       </spacer>
       </item>
      </layout>
     </widget>
+   </item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
    </item>
   </layout>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>mGbSerial</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>mSerialChild</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>71</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>255</x>
+     <y>125</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
