VirtualBox

Ignore:
Timestamp:
Jun 5, 2014 6:46:04 AM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector UI: Default splitter size-hints for first-run dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r51515 r51540  
    15011501void UISelectorWindow::loadSettings()
    15021502{
    1503     /* Get VBox object: */
    1504     CVirtualBox vbox = vboxGlobal().virtualBox();
    1505 
    15061503    /* Restore window position: */
    15071504    {
     
    15241521    /* Restore splitter handle position: */
    15251522    {
    1526         m_pSplitter->setSizes(gEDataManager->selectorWindowSplitterHints());
     1523        /* Read splitter hints: */
     1524        QList<int> sizes = gEDataManager->selectorWindowSplitterHints();
     1525        /* If both hints are zero, we have the 'default' case: */
     1526        if (sizes[0] == 0 && sizes[1] == 0)
     1527        {
     1528            /* Propose some 'default' based on current dialog width: */
     1529            sizes[0] = (double)width()     / 3 * .9;
     1530            sizes[1] = (double)width() * 2 / 3 * .9;
     1531        }
     1532        /* Pass hints to the splitter: */
     1533        m_pSplitter->setSizes(sizes);
    15271534    }
    15281535
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