VirtualBox

Ignore:
Timestamp:
Jul 11, 2008 1:25:34 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: Enable the page animation on the setting dialogs again.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
4 edited

Legend:

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

    r10519 r10525  
    192192void VBoxSettingsDialog::categoryChanged (int aId)
    193193{
    194 //#ifndef Q_WS_MAC
    195 #if 1
     194    int index = mSelector->idToIndex (aId);
     195#ifndef Q_WS_MAC
    196196# ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS
    197197    setWindowTitle (dialogTitle());
    198198# endif
    199199    mLbTitle->setText (mSelector->itemText (aId));
    200     mStack->setCurrentIndex (aId);
     200    mStack->setCurrentIndex (index);
    201201#else /* Q_WS_MAC */
    202     int index = mSelector->idToIndex (aId);
    203     /* We will update at once later */
    204     setUpdatesEnabled (false);
    205     /* Set all tab size policies to ignored */
    206     for (int i = 0; i < mStack->count(); ++i)
    207         mStack->widget (i)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Ignored);
    208     /* Set the size policy of the current tab to preferred */
    209     if (mStack->widget (index))
    210         mStack->widget (index)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred);
    211     /* Set the new current tab */
    212     mLbTitle->setText (::path (aItem));
    213     mStack->setCurrentIndex (index);
    214     /* Activate the new layout */
    215     layout()->activate();
    216     setUpdatesEnabled (true);
    217     //        mAllWidget->hide();
    218     /* Play the resize animation */
    219     ::darwinWindowAnimateResize (this, QRect (x(), y(),
    220                                               minimumSizeHint().width(), minimumSizeHint().height()));
    221     //        mAllWidget->show();
    222     /* Set the new size to Qt also */
    223     setFixedSize (minimumSizeHint());
     202    if (isVisible())
     203    {
     204        int index = mSelector->idToIndex (aId);
     205        /* We will update at once later */
     206        setUpdatesEnabled (false);
     207        setMinimumSize (QSize (minimumWidth(), 0));
     208        setMaximumSize (QSize (minimumWidth(), QWIDGETSIZE_MAX));
     209        /* Set all tab size policies to ignored */
     210        for (int i = 0; i < mStack->count(); ++i)
     211            mStack->widget (i)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Ignored);
     212        /* Set the size policy of the current tab to preferred */
     213        if (mStack->widget (index))
     214            mStack->widget (index)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred);
     215        /* Set the new current tab */
     216        mLbTitle->setText (mSelector->itemText (aId));
     217        mStack->setCurrentIndex (index);
     218        /* Activate the new layout */
     219        layout()->activate();
     220        setUpdatesEnabled (true);
     221        //        mAllWidget->hide();
     222        QSize s = minimumSize();
     223        int minWidth = mSelector->minWidth();
     224        if (minWidth > s.width())
     225            s.setWidth (minWidth);
     226        /* Play the resize animation */
     227        ::darwinWindowAnimateResize (this, QRect (x(), y(),
     228                                                  s.width(), s.height()));
     229        //        mAllWidget->show();
     230        /* Set the new size to Qt also */
     231        setFixedSize (s);
     232    }else
     233    {
     234        mLbTitle->setText (mSelector->itemText (aId));
     235        mStack->setCurrentIndex (index);
     236    }
    224237#endif /* !Q_WS_MAC */
    225238}
     
    336349    if (minWidth > s.width())
    337350        s.setWidth (minWidth);
     351#ifdef Q_WS_MAC
     352    setFixedSize (s);
     353#else /* Q_WS_MAC */
    338354    resize (s);
     355#endif /* Q_WS_MAC */
    339356
    340357    VBoxGlobal::centerWidget (this, parentWidget());
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGLSettingsLanguage.ui

    r10212 r10525  
    5353          <verstretch>0</verstretch>
    5454         </sizepolicy>
     55        </property>
     56        <property name="minimumSize" >
     57         <size>
     58          <width>0</width>
     59          <height>150</height>
     60         </size>
    5561        </property>
    5662        <property name="whatsThis" >
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsHD.ui

    r10167 r10525  
    2323    <x>0</x>
    2424    <y>0</y>
    25     <width>332</width>
    26     <height>270</height>
     25    <width>336</width>
     26    <height>306</height>
    2727   </rect>
    2828  </property>
     
    7070         <item>
    7171          <widget class="QITableView" name="mTwAts" >
     72           <property name="minimumSize" >
     73            <size>
     74             <width>0</width>
     75             <height>200</height>
     76            </size>
     77           </property>
    7278           <property name="contextMenuPolicy" >
    7379            <enum>Qt::ActionsContextMenu</enum>
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSF.ui

    r10167 r10525  
    5757      <item>
    5858       <widget class="QTreeWidget" name="mTreeView" >
     59        <property name="minimumSize" >
     60         <size>
     61          <width>0</width>
     62          <height>200</height>
     63         </size>
     64        </property>
    5965        <property name="contextMenuPolicy" >
    6066         <enum>Qt::CustomContextMenu</enum>
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