Changeset 93342 in vbox for trunk/src/VBox
- Timestamp:
- Jan 19, 2022 12:26:59 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r93196 r93342 763 763 m_iAnimatedValue = iValue; 764 764 adjustGeometry(); 765 emit sigAnimationStep(); 765 766 } 766 767 … … 799 800 /* We do include open-button mask only if center is opened or animated to be: */ 800 801 QRegion region; 801 if (! m_iAnimatedValue)802 if (!animatedValue()) 802 803 region += QRect(m_pButtonOpen->mapToParent(QPoint(0, 0)), m_pButtonOpen->size()); 803 804 setMask(region); -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r93115 r93342 55 55 /** Requests sliding state-machine to close overlay. */ 56 56 void sigClose(); 57 /** Notifies listeners about animation step. */ 58 void sigAnimationStep(); 57 59 58 60 public: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r93115 r93342 247 247 { 248 248 return frameBuffer() ? (double)(frameBuffer()->width()) / frameBuffer()->height() : 0; 249 } 250 251 void UIMachineView::updateView() 252 { 253 viewport()->update(); 249 254 } 250 255 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r93115 r93342 102 102 double aspectRatio() const; 103 103 104 /** Updates machine-view's viewport. 105 * @remarks Used to update in case of notification-center animation. */ 106 void updateView(); 104 107 /** Updates console's display viewport. 105 108 * @remarks Used to update 3D-service overlay viewport as well. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r93115 r93342 178 178 /* Update window-title: */ 179 179 updateAppearanceOf(UIVisualElement_WindowTitle); 180 } 181 182 void UIMachineWindow::sltHandleNotificationCenterAnimationStep() 183 { 184 /* For certain machine states: */ 185 const KMachineState enmState = uisession()->machineState(); 186 switch (enmState) 187 { 188 /* Like those related to paused VM: */ 189 case KMachineState_Paused: 190 case KMachineState_TeleportingPausedVM: 191 { 192 /* Update view's viewport, cause we have pause screenshot 193 * distorted with animation artifacts. */ 194 machineView()->updateView(); 195 break; 196 } 197 default: 198 break; 199 } 180 200 } 181 201 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r93115 r93342 125 125 virtual void sltMachineStateChanged(); 126 126 127 /** Handles notification-center animation steps. */ 128 void sltHandleNotificationCenterAnimationStep(); 129 127 130 protected: 128 131 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r93115 r93342 222 222 { 223 223 if (gpNotificationCenter && (m_uScreenId == 0)) 224 { 224 225 gpNotificationCenter->setParent(centralWidget()); 226 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0); 227 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 228 this, &UIMachineWindowFullscreen::sltHandleNotificationCenterAnimationStep); 229 } 225 230 } 226 231 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r93115 r93342 326 326 { 327 327 if (gpNotificationCenter && (m_uScreenId == 0)) 328 { 328 329 gpNotificationCenter->setParent(centralWidget()); 330 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0); 331 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 332 this, &UIMachineWindowNormal::sltHandleNotificationCenterAnimationStep); 333 } 329 334 } 330 335 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r93115 r93342 62 62 { 63 63 if (gpNotificationCenter && (m_uScreenId == 0)) 64 { 64 65 gpNotificationCenter->setParent(centralWidget()); 66 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0); 67 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 68 this, &UIMachineWindowScale::sltHandleNotificationCenterAnimationStep); 69 } 65 70 } 66 71
Note:
See TracChangeset
for help on using the changeset viewer.