Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp	(revision 68208)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UITabBar.cpp	(revision 68209)
@@ -26,4 +26,7 @@
 # include <QLabel>
 # include <QPainter>
+# ifdef VBOX_WS_MAC
+#  include <QStackedLayout>
+# endif
 # include <QStyle>
 # include <QToolButton>
@@ -42,4 +45,7 @@
 class QHBoxLayout;
 class QLabel;
+#ifdef VBOX_WS_MAC
+class QStackedLayout;
+#endif
 class QStyle;
 class QToolButton;
@@ -105,5 +111,9 @@
 
     /** Holds the main layout instance. */
-    QHBoxLayout *m_pLayout;
+    QHBoxLayout    *m_pLayout;
+#ifdef VBOX_WS_MAC
+    /** Holds the stacked layout instance. */
+    QStackedLayout *m_pLayoutStacked;
+#endif
 
     /** Holds the icon label instance. */
@@ -127,4 +137,7 @@
     , m_fHovered(false)
     , m_pLayout(0)
+#ifdef VBOX_WS_MAC
+    , m_pLayoutStacked(0)
+#endif
     , m_pLabelIcon(0)
     , m_pLabelName(0)
@@ -151,4 +164,7 @@
         case QEvent::Enter:
         {
+#ifdef VBOX_WS_MAC
+            m_pLayoutStacked->setCurrentWidget(m_pButtonClose);
+#endif
             m_fHovered = true;
             update();
@@ -157,4 +173,7 @@
         case QEvent::Leave:
         {
+#ifdef VBOX_WS_MAC
+            m_pLayoutStacked->setCurrentWidget(m_pLabelIcon);
+#endif
             m_fHovered = false;
             update();
@@ -267,8 +286,16 @@
         const int iMargin = iMetric / 2;
         const int iSpacing = iMargin / 2;
+#ifdef VBOX_WS_MAC
+        const int iMetricCloseButton = iMetric * 3 / 4;
+#else
         const int iMetricCloseButton = iMetric * 2 / 3;
+#endif
 
         /* Configure layout: */
+#ifdef VBOX_WS_MAC
+        m_pLayout->setContentsMargins(iMargin + iSpacing, 0, iMargin + iSpacing, 0);
+#else
         m_pLayout->setContentsMargins(iMargin + iSpacing, 0, iMargin, 0);
+#endif
         m_pLayout->setSpacing(iSpacing);
 
@@ -301,8 +328,28 @@
         }
 
+#ifdef VBOX_WS_MAC
+        /* Create stacked-layout: */
+        m_pLayoutStacked = new QStackedLayout(m_pLayout);
+        {
+            m_pLayoutStacked->setAlignment(Qt::AlignCenter);
+
+            /* Add icon-label and close-button into stacked-layout: */
+            m_pLayoutStacked->addWidget(m_pLabelIcon);
+            m_pLayoutStacked->addWidget(m_pButtonClose);
+            m_pLayoutStacked->setAlignment(m_pLabelIcon, Qt::AlignCenter);
+            m_pLayoutStacked->setAlignment(m_pButtonClose, Qt::AlignCenter);
+
+            /* Add stacked-layout into main-layout: */
+            m_pLayout->addLayout(m_pLayoutStacked);
+        }
+
+        /* Add name-label into main-layout: */
+        m_pLayout->addWidget(m_pLabelName);
+#else /* !VBOX_WS_MAC */
         /* Add everything into main-layout: */
         m_pLayout->addWidget(m_pLabelIcon);
         m_pLayout->addWidget(m_pLabelName);
         m_pLayout->addWidget(m_pButtonClose);
+#endif /* !VBOX_WS_MAC */
     }
 }
