VirtualBox

Changeset 9404

Show
Ignore:
Timestamp:
06/05/08 10:55:54 (6 months ago)
Author:
vboxsync
Message:

FE/Qt4: Added some space between the info panels of the VDM.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDiskImageManagerDlg.h

    r9296 r9404  
    126126    void clearInfoPanes(); 
    127127    void prepareToRefresh (int aTotal = 0); 
    128     void createInfoString (InfoPaneLabel *&aInfo, QWidget* aRoot, int aRow, int aCol, int aRowSpan = 1, int aColSpan = 1) const; 
     128    void createInfoString (InfoPaneLabel *&aInfo, QWidget* aRoot, bool aLeftRigthMargin, int aRow, int aCol, int aRowSpan = 1, int aColSpan = 1) const; 
    129129 
    130130    void makeWarningMark (DiskImageItem *aItem, VBoxMedia::Status aStatus, VBoxDefs::DiskType aType) const; 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp

    r9386 r9404  
    412412    fdsContainerLayout->setSpacing (0); 
    413413    /* Create info-pane for hd list-view */ 
    414     createInfoString (mHdsPane1, mHdsContainer, 0, 0, 1, 3); 
    415     createInfoString (mHdsPane2, mHdsContainer, 1, 0); 
    416     createInfoString (mHdsPane3, mHdsContainer, 1, 2); 
    417     createInfoString (mHdsPane4, mHdsContainer, 2, 0); 
    418     createInfoString (mHdsPane5, mHdsContainer, 2, 2); 
     414    createInfoString (mHdsPane1, mHdsContainer, false, 0, 0, 1, 3); 
     415    createInfoString (mHdsPane2, mHdsContainer, true, 1, 0); 
     416    createInfoString (mHdsPane3, mHdsContainer, false, 1, 2); 
     417    createInfoString (mHdsPane4, mHdsContainer, true, 2, 0); 
     418    createInfoString (mHdsPane5, mHdsContainer, false, 2, 2); 
    419419    /* Create info-pane for cd list-view */ 
    420     createInfoString (mCdsPane1, mCdsContainer, 0, 0); 
    421     createInfoString (mCdsPane2, mCdsContainer, 1, 0); 
     420    createInfoString (mCdsPane1, mCdsContainer, false, 0, 0); 
     421    createInfoString (mCdsPane2, mCdsContainer, false, 1, 0); 
    422422    /* Create info-pane for fd list-view */ 
    423     createInfoString (mFdsPane1, mFdsContainer, 0, 0); 
    424     createInfoString (mFdsPane2, mFdsContainer, 1, 0); 
     423    createInfoString (mFdsPane1, mFdsContainer, false, 0, 0); 
     424    createInfoString (mFdsPane2, mFdsContainer, false, 1, 0); 
    425425 
    426426    /* Enumeration progressbar creation */ 
     
    19971997void VBoxDiskImageManagerDlg::createInfoString (InfoPaneLabel *&aInfo, 
    19981998                                                QWidget *aRoot, 
     1999                                                bool aLeftRigthMargin, 
    19992000                                                int aRow, int aCol, 
    20002001                                                int aRowSpan /* = 1 */, int aColSpan /* = 1 */) const 
     
    20152016    /* Add the two widgets */ 
    20162017    rootLayout->addWidget (nameLabel, aRow, aCol, 1, 1); 
     2018    int margin = aInfo->style()->pixelMetric (QStyle::PM_LayoutHorizontalSpacing); 
     2019#if QT_VERSION >= 0x040300 
     2020    if (margin == -1) 
     2021        margin = aInfo->style()->layoutSpacing (QSizePolicy::Label, QSizePolicy::Label, Qt::Horizontal); 
     2022#endif /* QT_VERSION >= 0x040300 */ 
     2023    if (aLeftRigthMargin) 
     2024        aInfo->setContentsMargins (margin, NULL, margin, NULL); 
     2025    else  
     2026        aInfo->setContentsMargins (margin, NULL, NULL, NULL); 
    20172027    rootLayout->addWidget (aInfo, aRow, aCol + 1, aRowSpan, aColSpan); 
    20182028} 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy