Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp	(revision 80544)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp	(revision 80545)
@@ -161,5 +161,4 @@
     void setFontSize(int iFontSize);
     int  fontSize() const;
-    void setTextList(const QStringList &textList);
     const QStringList &textList() const;
 
@@ -190,5 +189,4 @@
 private:
 
-    virtual void computeFontSize();
     /** @name Drawing helper functions.
      * @{ */
@@ -210,5 +208,4 @@
     int m_iMarginTop;
     int m_iMarginBottom;
-    QStringList m_textList;
     QRect m_lineChartRect;
     int m_iPieChartRadius;
@@ -246,5 +243,4 @@
     setSelectionMode(QAbstractItemView::NoSelection);
 
-
     m_pTimer = new QTimer(this);
     if (m_pTimer)
@@ -253,5 +249,4 @@
         m_pTimer->start(5000);
     }
-
 
     retranslateUi();
@@ -331,5 +326,4 @@
         strResolution += m_strMonitorTurnedOff;
     }
-
     return strResolution;
 }
@@ -344,5 +338,4 @@
     ULONG uGuestScreens = m_machine.GetMonitorCount();
     m_screenResolutions.resize(uGuestScreens);
-
     if (iScreenID != -1 && iScreenID >= (int)uGuestScreens)
         return;
@@ -362,5 +355,4 @@
             removeRow(i);
     }
-
     for (ULONG iScreen = 0; iScreen < uGuestScreens; ++iScreen)
     {
@@ -455,5 +447,4 @@
     updateScreenInfo();
     updateUpTime();
-
 
     /* Determine virtualization attributes: */
@@ -537,10 +528,10 @@
 
     m_iMarginLeft = 1 * qApp->QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
-    m_iMarginRight = 6 * qApp->QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
+    m_iMarginRight = 9 * QFontMetrics(font()).width('X');
     m_iMarginTop = 0.3 * qApp->QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
     m_iMarginBottom = 2 * qApp->QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
 
     float fAppIconSize = qApp->style()->pixelMetric(QStyle::PM_LargeIconSize);
-    m_size = QSize(14 * fAppIconSize,  4 * fAppIconSize);
+    m_size = QSize(14 * fAppIconSize,  3.5 * fAppIconSize);
     m_iPieChartSpacing = 2;
     m_iPieChartRadius = m_size.height() - (m_iMarginTop + m_iMarginBottom + 2 * m_iPieChartSpacing);
@@ -557,15 +548,4 @@
 {
     return m_font.pixelSize();
-}
-
-void UIChart::setTextList(const QStringList &textList)
-{
-    m_textList = textList;
-    computeFontSize();
-}
-
-const QStringList &UIChart::textList() const
-{
-    return m_textList;
 }
 
@@ -638,21 +618,4 @@
     m_strGAWarning = QApplication::translate("UIVMInformationDialog", "No guest additions! This metric requires guest additions to work properly.");
     m_strResetActionLabel = QApplication::translate("UIVMInformationDialog", "Reset");
-}
-
-void UIChart::computeFontSize()
-{
-    int iFontSize = 24;
-    foreach (const QString &strText, m_textList)
-    {
-        m_font.setPixelSize(iFontSize);
-        do{
-            int iWidth = QFontMetrics(m_font).width(strText);
-            if (iWidth + m_iMarginLeft + m_iMarginRight > m_size.width())
-                --iFontSize;
-            else
-                break;
-            m_font.setPixelSize(iFontSize);
-        }while(iFontSize > 1);
-    }
 }
 
@@ -1178,5 +1141,4 @@
     iMaximum = qMax(iMaximum, m_strVMExitLabelTotal.length());
 
-
     /* Compute the maximum label string length and set it as a fixed width to labels to prevent always changing widths: */
     /* Add m_iDecimalCount plus 3 characters for the number and 3 for unit string: */
@@ -1193,5 +1155,4 @@
         }
     }
-
 }
 
@@ -1252,5 +1213,4 @@
     m_pRuntimeInfoWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
 
-
     QWidget *bottomSpacerWidget = new QWidget(this);
     bottomSpacerWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
@@ -1265,5 +1225,4 @@
 void UIInformationRuntime::sltTimeout()
 {
-
     if (m_performanceMonitor.isNull())
         return;
@@ -1322,9 +1281,7 @@
     quint64 uNetworkTotalReceive = 0;
     quint64 uNetworkTotalTransmit = 0;
-
     quint64 uDiskIOTotalWritten = 0;
     quint64 uDiskIOTotalRead = 0;
-
-   quint64 uTotalVMExits = 0;
+    quint64 uTotalVMExits = 0;
 
     QVector<DebuggerMetricData> xmlData = getTotalCounterFromDegugger(m_strQueryString);
@@ -1482,5 +1439,4 @@
         m_strQueryString += iterator.value().queryString();
     }
-
 }
 
@@ -1655,7 +1611,5 @@
     if (m_charts.contains(m_strDiskIOMetricName))
         m_charts[m_strDiskIOMetricName]->update();
-
-}
-
+}
 
 void UIInformationRuntime::updateVMExitMetric(quint64 uTotalVMExits)
@@ -1665,9 +1619,6 @@
 
     UIMetric &VMExitMetric = m_subMetrics[m_strVMExitMetricName];
-
     quint64 iRate = uTotalVMExits - VMExitMetric.total(0);
-
     VMExitMetric.setTotal(0, uTotalVMExits);
-
     /* Do not set data and maximum if the metric has not been initialized  since we need to initialize totals "(t-1)" first: */
     if (!VMExitMetric.isInitialized())
@@ -1676,9 +1627,7 @@
         return;
     }
-
     VMExitMetric.addData(0, iRate);
     quint64 iMaximum = qMax(VMExitMetric.maximum(), iRate);
     VMExitMetric.setMaximum(iMaximum);
-
     if (m_infoLabels.contains(m_strVMExitMetricName)  && m_infoLabels[m_strVMExitMetricName])
     {
@@ -1713,5 +1662,4 @@
         return xmlData;
     CMachineDebugger debugger = m_console.GetDebugger();
-
     QString strStats = debugger.GetStats(strQuery, false);
     QXmlStreamReader xmlReader;
@@ -1740,5 +1688,4 @@
             else
                 xmlReader.skipCurrentElement();
-
         }
     }
