- Timestamp:
- Mar 19, 2025 4:59:07 PM (8 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168029
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
r108616 r108617 149 149 setStartValue(fForward ? 0 : 100); 150 150 setEndValue(fForward ? 100 : 0); 151 setDuration( 200);151 setDuration(1000); 152 152 } 153 153 … … 204 204 void UIToolsAnimationEngine::sltHandleAnimationStarted() 205 205 { 206 /* Make animated items hidden initially: */207 m_pParent->setAnimatedToolClass(UIToolClass_Machine, true);208 m_pParent->setAnimatedToolClass(UIToolClass_Management, true);209 210 206 /* Mark state Animated: */ 211 207 m_enmState = State_Animated; … … 214 210 void UIToolsAnimationEngine::sltHandleAnimationFinished() 215 211 { 216 /* Make animated items visible again: */217 m_pParent->setAnimatedToolClass(UIToolClass_Machine, false);218 m_pParent->setAnimatedToolClass(UIToolClass_Management, false);219 220 212 /* Recalculate effective state: */ 221 213 m_enmState = State_Home; … … 615 607 int iVerticalIndentGlobal = iMargin; 616 608 int iVerticalIndentRest = iMargin; 609 int iVerticalIndentSub = 0; 617 610 618 611 /* Layout normal children: */ … … 674 667 case UIToolClass_Management: 675 668 { 669 /* Acquire item properties: */ 670 const int iItemHeight = pItem->minimumHeightHint(); 671 int iPos = iMargin; 672 673 /* Do we have animation engine? */ 674 if (m_pAnimationEngine) 675 { 676 /* Append some animated indentation to items of certain classes: */ 677 switch (pItem->itemClass()) 678 { 679 case UIToolClass_Machine: 680 { 681 const double fRatio = (double)animationProgressMachines() / 25 /* make it from 0.0 to 4.0 */; 682 iPos = iPos 683 + (4.0 - fRatio) * iViewportWidth /* move item from off-screen space */ 684 + iVerticalIndentSub - fRatio / 4 * overallShiftMachines() /* desync item movement */; 685 break; 686 } 687 case UIToolClass_Management: 688 { 689 const double fRatio = (double)animationProgressManagers() / 25 /* make it from 0.0 to 4.0 */; 690 iPos = iPos 691 + (4.0 - fRatio) * iViewportWidth /* move item from off-screen space */ 692 + iVerticalIndentSub - fRatio / 4 * overallShiftManagers() /* desync item movement */; 693 break; 694 } 695 default: break; 696 } 697 698 /* Restrain origin: */ 699 iPos = qMax(iMargin, iPos); 700 } 701 676 702 /* Set item position: */ 677 pItem->setPos(i Margin, iVerticalIndentRest);703 pItem->setPos(iPos, iVerticalIndentRest); 678 704 /* Set root-item size: */ 679 705 pItem->resize(iViewportWidth, iItemHeight); … … 682 708 /* Advance vertical indent: */ 683 709 iVerticalIndentRest += (iItemHeight + iSpacing); 710 iVerticalIndentSub += (iItemHeight + iSpacing); 684 711 685 712 break;
Note:
See TracChangeset
for help on using the changeset viewer.