Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp	(revision 43982)
@@ -20,11 +20,11 @@
 /* Qt includes: */
 #include <QApplication>
-#include <QPainter>
-#include <QStyleOptionGraphicsItem>
-#include <QTextLayout>
-#include <QGraphicsSceneMouseEvent>
+#include <QGraphicsView>
 #include <QStateMachine>
 #include <QPropertyAnimation>
 #include <QSignalTransition>
+#include <QTextLayout>
+#include <QStyleOptionGraphicsItem>
+#include <QGraphicsSceneMouseEvent>
 
 /* GUI includes: */
@@ -61,10 +61,12 @@
     prepareButton();
 
-    /* Update size-policy/hint: */
+    /* Setup size-policy: */
     setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-    /* Update: */
+
+    /* Update hover access: */
     updateHoverAccessibility();
 
     /* Add item to the parent: */
+    AssertMsg(parentItem(), ("No parent set for details element!"));
     parentItem()->addItem(this);
 }
@@ -75,19 +77,4 @@
     AssertMsg(parentItem(), ("No parent set for details element!"));
     parentItem()->removeItem(this);
-}
-
-DetailsElementType UIGDetailsElement::elementType() const
-{
-    return m_type;
-}
-
-bool UIGDetailsElement::closed() const
-{
-    return m_fClosed;
-}
-
-bool UIGDetailsElement::opened() const
-{
-    return !m_fClosed;
 }
 
@@ -136,4 +123,5 @@
 void UIGDetailsElement::markAnimationFinished()
 {
+    /* Mark animation as non-running: */
     m_fAnimationRunning = false;
 }
@@ -152,5 +140,5 @@
     updateAnimationParameters();
 
-    /* Toggle element state: */
+    /* Invert toggle-state: */
     m_fClosed = !m_fClosed;
 }
@@ -170,5 +158,5 @@
     switch (iKey)
     {
-        /* Layout hints: */
+        /* Hints: */
         case ElementData_Margin: return 5;
         case ElementData_Spacing: return 10;
@@ -347,9 +335,4 @@
 }
 
-UITextTable UIGDetailsElement::text() const
-{
-    return m_text;
-}
-
 void UIGDetailsElement::setText(const UITextTable &text)
 {
@@ -476,17 +459,10 @@
 void UIGDetailsElement::setAdditionalHeight(int iAdditionalHeight)
 {
+    /* Cache new value: */
     m_iAdditionalHeight = iAdditionalHeight;
+    /* Update layout: */
     updateLayout();
+    /* Repaint: */
     update();
-}
-
-int UIGDetailsElement::additionalHeight() const
-{
-    return m_iAdditionalHeight;
-}
-
-UIGraphicsRotatorButton* UIGDetailsElement::button() const
-{
-    return m_pButton;
 }
 
@@ -547,5 +523,5 @@
     paintDecorations(pPainter, pOption);
 
-    /* Paint machine info: */
+    /* Paint element info: */
     paintElementInfo(pPainter, pOption);
 }
@@ -774,22 +750,27 @@
 void UIGDetailsElement::mousePressEvent(QGraphicsSceneMouseEvent *pEvent)
 {
-    if (m_fNameHovered)
-    {
-        pEvent->accept();
-        QString strCategory;
-        if (m_type >= DetailsElementType_General &&
-            m_type <= DetailsElementType_SF)
-            strCategory = QString("#%1").arg(gpConverter->toInternalString(m_type));
-        else if (m_type == DetailsElementType_Description)
-            strCategory = QString("#%1%%mTeDescription").arg(gpConverter->toInternalString(m_type));
-        emit sigLinkClicked(strCategory, QString(), machine().GetId());
-    }
+    /* Only for hovered header: */
+    if (!m_fNameHovered)
+        return;
+
+    /* Process link click: */
+    pEvent->accept();
+    QString strCategory;
+    if (m_type >= DetailsElementType_General &&
+        m_type <= DetailsElementType_SF)
+        strCategory = QString("#%1").arg(gpConverter->toInternalString(m_type));
+    else if (m_type == DetailsElementType_Description)
+        strCategory = QString("#%1%%mTeDescription").arg(gpConverter->toInternalString(m_type));
+    emit sigLinkClicked(strCategory, QString(), machine().GetId());
 }
 
 void UIGDetailsElement::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *pEvent)
 {
+    /* Only for left-button: */
+    if (pEvent->button() != Qt::LeftButton)
+        return;
+
     /* Process left-button double-click: */
-    if (pEvent->button() == Qt::LeftButton)
-        emit sigToggleElement(m_type, closed());
+    emit sigToggleElement(m_type, closed());
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.h	(revision 43982)
@@ -75,9 +75,9 @@
 
     /* API: Element type: */
-    DetailsElementType elementType() const;
+    DetailsElementType elementType() const { return m_type; }
 
     /* API: Open/close stuff: */
-    bool closed() const;
-    bool opened() const;
+    bool closed() const { return m_fClosed; }
+    bool opened() const { return !m_fClosed; }
     void close(bool fAnimated = true);
     void open(bool fAnimated = true);
@@ -106,5 +106,5 @@
     enum ElementData
     {
-        /* Layout hints: */
+        /* Hints: */
         ElementData_Margin,
         ElementData_Spacing,
@@ -134,5 +134,5 @@
 
     /* API: Text stuff: */
-    UITextTable text() const;
+    UITextTable text() const { return m_text; }
     void setText(const UITextTable &text);
 
@@ -149,8 +149,9 @@
     /* Helpers: Animation stuff: */
     void setAdditionalHeight(int iAdditionalHeight);
-    int additionalHeight() const;
-    UIGraphicsRotatorButton* button() const;
-
-protected:
+    int additionalHeight() const { return m_iAdditionalHeight; }
+    UIGraphicsRotatorButton* button() const { return m_pButton; }
+    bool isAnimationRunning() const { return m_fAnimationRunning; }
+
+private:
 
     /* API: Children stuff: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp	(revision 43982)
@@ -246,5 +246,5 @@
     if (closed() && m_pPreview->isVisible())
         m_pPreview->hide();
-    if (opened() && !m_pPreview->isVisible() && !m_fAnimationRunning)
+    if (opened() && !m_pPreview->isVisible() && !isAnimationRunning())
         m_pPreview->show();
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h	(revision 43982)
@@ -136,5 +136,5 @@
 private:
 
-    /* Helpers: Size-hint stuff: */
+    /* Helpers: Layout stuff: */
     int minimumWidthHint() const;
     int minimumHeightHint(bool fClosed) const;
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsGroup.cpp	(revision 43982)
@@ -27,7 +27,4 @@
 #include "UIConverter.h"
 #include "VBoxGlobal.h"
-
-/* Other VBox includes: */
-#include <iprt/assert.h>
 
 UIGDetailsGroup::UIGDetailsGroup()
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp	(revision 43982)
@@ -83,4 +83,5 @@
 void UIGDetailsItem::updateSizeHint()
 {
+    /* Update the geometry: */
     updateGeometry();
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp	(revision 43982)
@@ -20,6 +20,6 @@
 /* Qt includes: */
 #include <QGraphicsScene>
+#include <QGraphicsSceneContextMenuEvent>
 #include <QGraphicsView>
-#include <QGraphicsSceneContextMenuEvent>
 
 /* GUI includes: */
@@ -27,12 +27,6 @@
 #include "UIGDetailsGroup.h"
 #include "UIGDetailsElement.h"
-#include "UIGChooserItemGroup.h"
-#include "UIGChooserItemMachine.h"
 #include "VBoxGlobal.h"
-#include "UIMessageCenter.h"
 #include "UIConverter.h"
-
-/* COM includes: */
-#include "CMachine.h"
 
 UIGDetailsModel::UIGDetailsModel(QObject *pParent)
@@ -66,5 +60,5 @@
 }
 
-QPaintDevice* UIGDetailsModel::paintDevice() const
+QGraphicsView* UIGDetailsModel::paintDevice() const
 {
     if (!m_pScene || m_pScene->views().isEmpty())
@@ -73,22 +67,24 @@
 }
 
-QGraphicsItem* UIGDetailsModel::itemAt(const QPointF &position, const QTransform &deviceTransform /* = QTransform() */) const
-{
-    return scene()->itemAt(position, deviceTransform);
+QGraphicsItem* UIGDetailsModel::itemAt(const QPointF &position) const
+{
+    return scene()->itemAt(position);
 }
 
 void UIGDetailsModel::updateLayout()
 {
-    /* Initialize variables: */
+    /* Prepare variables: */
     int iSceneMargin = data(DetailsModelData_Margin).toInt();
-    QSize viewportSize = scene()->views()[0]->viewport()->size();
+    QSize viewportSize = paintDevice()->viewport()->size();
     int iViewportWidth = viewportSize.width() - 2 * iSceneMargin;
     int iViewportHeight = viewportSize.height() - 2 * iSceneMargin;
-    /* Set root item position: */
+
+    /* Move root: */
     m_pRoot->setPos(iSceneMargin, iSceneMargin);
-    /* Set root item size: */
+    /* Resize root: */
     m_pRoot->resize(iViewportWidth, iViewportHeight);
-    /* Relayout root item: */
+    /* Layout root content: */
     m_pRoot->updateLayout();
+
     /* Notify listener about root-item relayouted: */
     emit sigRootItemResized(m_pRoot->geometry().size(), m_pRoot->minimumSizeHint().toSize().width());
@@ -108,7 +104,8 @@
 void UIGDetailsModel::sltToggleElements(DetailsElementType type, bool fToggled)
 {
-    /* Make sure not started yet: */
+    /* Make sure it is not started yet: */
     if (m_pAnimationCallback)
         return;
+
     /* Prepare/configure animation callback: */
     m_pAnimationCallback = new UIGDetailsElementAnimationCallback(this, type, fToggled);
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h	(revision 43982)
@@ -23,5 +23,4 @@
 #include <QObject>
 #include <QPointer>
-#include <QTransform>
 #include <QMap>
 #include <QSet>
@@ -37,4 +36,5 @@
 class QGraphicsScene;
 class QGraphicsSceneContextMenuEvent;
+class QGraphicsView;
 class UIGDetailsGroup;
 class UIVMItem;
@@ -63,6 +63,6 @@
     /* API: Scene stuff: */
     QGraphicsScene* scene() const;
-    QPaintDevice* paintDevice() const;
-    QGraphicsItem* itemAt(const QPointF &position, const QTransform &deviceTransform = QTransform()) const;
+    QGraphicsView* paintDevice() const;
+    QGraphicsItem* itemAt(const QPointF &position) const;
 
     /* API: Layout stuff: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h	(revision 43981)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h	(revision 43982)
@@ -40,5 +40,5 @@
 private slots:
 
-    /* Handler: Resize stuff: */
+    /* Handler: Root-item stuff: */
     void sltHandleRootItemResized(const QSizeF &size, int iMinimumWidth);
 
