Changeset 77026 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 28, 2019 6:14:00 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128453
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
r76942 r77026 67 67 68 68 UIChooserItemGlobal::UIChooserItemGlobal(UIChooserItem *pParent, 69 UIChooserItemGlobal * 69 UIChooserItemGlobal *pCopyFrom, 70 70 int iPosition /* = -1 */) 71 71 : UIChooserItem(pParent, pParent->isTemporary(), 0, 100) … … 78 78 , m_iMinimumNameWidth(0) 79 79 , m_iMaximumNameWidth(0) 80 , m_iHeightHint(pCopyFrom->heightHint()) 80 81 { 81 82 /* Prepare: */ … … 149 150 updateGeometry(); 150 151 model()->updateLayout(); 152 } 153 154 int UIChooserItemGlobal::heightHint() const 155 { 156 return m_iHeightHint; 151 157 } 152 158 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.h
r76581 r77026 59 59 /** Defines height @a iHint. */ 60 60 void setHeightHint(int iHint); 61 /** Returns height hint. */ 62 int heightHint() const; 61 63 /** @} */ 62 64 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r76920 r77026 79 79 , m_fIsScrollingInProgress(false) 80 80 , m_pLookupTimer(0) 81 , m_iGlobalItemHeightHint(-1)82 81 { 83 82 /* Prepare: */ … … 472 471 m_pLeftRoot->setPos(0, 0); 473 472 m_pLeftRoot->resize(root()->geometry().size()); 474 if (fLeftRootIsMain)475 {476 foreach (UIChooserItem *pItem, m_pLeftRoot->items(UIChooserItemType_Global))477 pItem->toGlobalItem()->setHeightHint(m_iGlobalItemHeightHint);478 }479 473 480 474 /* Create right root: */ … … 513 507 m_pLeftRoot->setPos(- root()->geometry().width(), 0); 514 508 m_pLeftRoot->resize(root()->geometry().size()); 515 if (fLeftRootIsMain)516 {517 foreach (UIChooserItem *pItem, m_pLeftRoot->items(UIChooserItemType_Global))518 pItem->toGlobalItem()->setHeightHint(m_iGlobalItemHeightHint);519 }520 509 521 510 /* Create right root: */ … … 685 674 void UIChooserModel::setGlobalItemHeightHint(int iHint) 686 675 { 687 /* Remember new hint: */688 m_iGlobalItemHeightHint = iHint;689 690 676 /* Walk thrugh all the items of navigation list: */ 691 677 foreach (UIChooserItem *pItem, navigationList()) … … 697 683 UIChooserItemGlobal *pGlobalItem = pItem->toGlobalItem(); 698 684 if (pGlobalItem) 699 pGlobalItem->setHeightHint( m_iGlobalItemHeightHint);685 pGlobalItem->setHeightHint(iHint); 700 686 } 701 687 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r76915 r77026 523 523 /** Holds the Id of last VM created from the GUI side. */ 524 524 QUuid m_uLastCreatedMachineId; 525 526 /** Holds the global item height hint. */527 int m_iGlobalItemHeightHint;528 525 /** @} */ 529 526
Note:
See TracChangeset
for help on using the changeset viewer.