Changeset 93366 in vbox for trunk/src/VBox
- Timestamp:
- Jan 20, 2022 5:13:31 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
r93342 r93366 763 763 m_iAnimatedValue = iValue; 764 764 adjustGeometry(); 765 emit sigAnimationStep();766 765 } 767 766 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r93342 r93366 55 55 /** Requests sliding state-machine to close overlay. */ 56 56 void sigClose(); 57 /** Notifies listeners about animation step. */58 void sigAnimationStep();59 57 60 58 public: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r93342 r93366 247 247 { 248 248 return frameBuffer() ? (double)(frameBuffer()->width()) / frameBuffer()->height() : 0; 249 }250 251 void UIMachineView::updateView()252 {253 viewport()->update();254 249 } 255 250 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r93342 r93366 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();107 104 /** Updates console's display viewport. 108 105 * @remarks Used to update 3D-service overlay viewport as well. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r93342 r93366 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 screenshot193 * distorted with animation artifacts. */194 machineView()->updateView();195 break;196 }197 default:198 break;199 }200 180 } 201 181 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r93342 r93366 125 125 virtual void sltMachineStateChanged(); 126 126 127 /** Handles notification-center animation steps. */128 void sltHandleNotificationCenterAnimationStep();129 130 127 protected: 131 128 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r93342 r93366 222 222 { 223 223 if (gpNotificationCenter && (m_uScreenId == 0)) 224 {225 224 gpNotificationCenter->setParent(centralWidget()); 226 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0);227 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep,228 this, &UIMachineWindowFullscreen::sltHandleNotificationCenterAnimationStep);229 }230 225 } 231 226 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r93342 r93366 326 326 { 327 327 if (gpNotificationCenter && (m_uScreenId == 0)) 328 {329 328 gpNotificationCenter->setParent(centralWidget()); 330 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0);331 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep,332 this, &UIMachineWindowNormal::sltHandleNotificationCenterAnimationStep);333 }334 329 } 335 330 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r93342 r93366 62 62 { 63 63 if (gpNotificationCenter && (m_uScreenId == 0)) 64 {65 64 gpNotificationCenter->setParent(centralWidget()); 66 disconnect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep, 0, 0);67 connect(gpNotificationCenter, &UINotificationCenter::sigAnimationStep,68 this, &UIMachineWindowScale::sltHandleNotificationCenterAnimationStep);69 }70 65 } 71 66
Note:
See TracChangeset
for help on using the changeset viewer.