VirtualBox

Changeset 11609 in vbox


Ignore:
Timestamp:
Aug 25, 2008 12:14:41 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Fixed some layout/handling issues for the networking pane.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsNetwork.cpp

    r11530 r11609  
    371371    mLeTerminate_x11->setVisible (aVisible);
    372372    mTbTerminate_x11->setVisible (aVisible);
     373    /* Make sure the layout is recalculated (Important on the mac). */
     374    layout()->activate();
    373375}
    374376
     
    416418    : QIWithRetranslateUI<QWidget> (aParent)
    417419{
    418     QGridLayout *mainLayout = new QGridLayout (this);
     420    QVBoxLayout *mainLayout = new QVBoxLayout (this);
    419421    VBoxGlobal::setLayoutMargin (mainLayout, 0);
    420422    mLbTitle = new QILabelSeparator();
    421     mainLayout->addWidget (mLbTitle, 0, 0, 1, 2);
     423    mainLayout->addWidget (mLbTitle);
    422424//    mainLayout->addItem (new QSpacerItem (8, 16, QSizePolicy::Fixed, QSizePolicy::Minimum), 1, 0);
    423425    /* Creating List Widget */
    424426    QHBoxLayout *layout = new QHBoxLayout ();
    425     mainLayout->addLayout (layout, 1, 0);
     427    mainLayout->addLayout (layout);
    426428    mList = new QTreeWidget (this);
    427429    setFocusProxy (mList);
     
    447449# endif /* Q_WS_WIN */
    448450
     451# if defined (Q_WS_WIN)
    449452    /* Prepare toolbar */
    450453    VBoxToolBar *toolBar = new VBoxToolBar (this);
     
    452455    toolBar->setIconSize (QSize (16, 16));
    453456    toolBar->setOrientation (Qt::Vertical);
    454 # if defined (Q_WS_WIN)
    455457    toolBar->addAction (mAddAction);
    456458    toolBar->addAction (mDelAction);
     459    layout->addWidget (toolBar);
    457460# endif /* Q_WS_WIN */
    458     layout->addWidget (toolBar);
    459461
    460462    /* Setup connections */
     
    495497    if (aName.isEmpty())
    496498    {
     499#ifdef Q_WS_MAC
     500        /* Always select the first item to have an initial value. */
     501        QTreeWidgetItem *item = mList->topLevelItem (0);
     502        if (item)
     503        {
     504            item->setSelected (true);
     505            mList->setCurrentItem (item);
     506            onCurrentItemChanged (mList->currentItem());
     507        }
     508#else
    497509        /* Make sure no one of items selected in the list currently */
    498         mList->setCurrentItem (0);
     510        mList->setCurrentItem (NULL);
    499511        mList->clearSelection();
     512#endif
    500513    }
    501514    else
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