VirtualBox

Changeset 43990 in vbox


Ignore:
Timestamp:
Nov 28, 2012 4:49:12 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group UI: Details-view: More strict viewport space calculation.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp

    r43983 r43990  
    9191{
    9292    /* Setup details-model connections: */
    93     connect(m_pDetailsModel, SIGNAL(sigRootItemResized(const QSizeF&, int)),
    94             m_pDetailsView, SLOT(sltHandleRootItemResized(const QSizeF&, int)));
     93    connect(m_pDetailsModel, SIGNAL(sigRootMinimumSizeHintChanged(const QSizeF&)),
     94            m_pDetailsView, SLOT(sltHandleRootItemMinimumSizeHintChanged(const QSizeF&)));
    9595    connect(m_pDetailsModel, SIGNAL(sigLinkClicked(const QString&, const QString&, const QString&)),
    9696            this, SIGNAL(sigLinkClicked(const QString&, const QString&, const QString&)));
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp

    r43983 r43990  
    8787    m_pRoot->updateLayout();
    8888
    89     /* Notify listener about root-item relayouted: */
    90     emit sigRootItemResized(m_pRoot->geometry().size(), m_pRoot->minimumSizeHint().toSize().width());
     89    /* Notify view about root minimum-size-hint changed: */
     90    emit sigRootMinimumSizeHintChanged(m_pRoot->minimumSizeHint());
    9191}
    9292
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h

    r43983 r43990  
    5050
    5151    /* Notifier: Root-item stuff: */
    52     void sigRootItemResized(const QSizeF &size, int iMinimumWidth);
     52    void sigRootMinimumSizeHintChanged(const QSizeF &minimumSizeHint);
    5353
    5454    /* Notifier: Link processing stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp

    r43936 r43990  
    3535    setFrameShape(QFrame::NoFrame);
    3636    setFrameShadow(QFrame::Plain);
     37    setAlignment(Qt::AlignLeft | Qt::AlignTop);
    3738
    3839    /* Setup scroll-bars policy: */
     
    4344}
    4445
    45 void UIGDetailsView::sltHandleRootItemResized(const QSizeF &size, int iMinimumWidth)
     46void UIGDetailsView::sltHandleRootItemMinimumSizeHintChanged(const QSizeF &minimumSizeHint)
    4647{
    4748    /* Update scene-rect: */
    48     updateSceneRect(size);
     49    updateSceneRect(minimumSizeHint);
    4950
    50     /* Set minimum width: */
    51     setMinimumWidth(2 * frameWidth() + iMinimumWidth +
     51    /* Set minimum-width: */
     52    setMinimumWidth(2 * frameWidth() +
     53                    minimumSizeHint.width() +
    5254                    verticalScrollBar()->sizeHint().width());
    5355}
     
    6971}
    7072
    71 void UIGDetailsView::updateSceneRect(const QSizeF &sizeHint /* = QSizeF() */)
     73void UIGDetailsView::updateSceneRect(const QSizeF &minimumSizeHint /* = QSizeF() */)
    7274{
    7375    QPointF topLeft = QPointF(0, 0);
    7476    QSizeF rectSize = viewport()->size();
    75     if (!sizeHint.isNull())
    76         rectSize = rectSize.expandedTo(sizeHint);
     77    if (!minimumSizeHint.isNull())
     78        rectSize.setHeight(minimumSizeHint.height());
    7779    setSceneRect(QRectF(topLeft, rectSize));
    7880}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h

    r43982 r43990  
    4141
    4242    /* Handler: Root-item stuff: */
    43     void sltHandleRootItemResized(const QSizeF &size, int iMinimumWidth);
     43    void sltHandleRootItemMinimumSizeHintChanged(const QSizeF &minimumSizeHint);
    4444
    4545private:
     
    5252
    5353    /* Helper: Update stuff: */
    54     void updateSceneRect(const QSizeF &sizeHint = QSizeF());
     54    void updateSceneRect(const QSizeF &minimumSizeHint = QSizeF());
    5555};
    5656
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette