Changeset 76062 in vbox
- Timestamp:
- Dec 7, 2018 3:34:38 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
-
globals/UIActionPoolRuntime.cpp (modified) (4 diffs)
-
globals/UIActionPoolRuntime.h (modified) (2 diffs)
-
runtime/UIMachineView.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r76056 r76062 3125 3125 } 3126 3126 3127 void UIActionPoolRuntime::setHostScreenForGuestScreenMap(const QMap<int, int> & map)3128 { 3129 m_mapHostScreenForGuestScreen = map;3127 void UIActionPoolRuntime::setHostScreenForGuestScreenMap(const QMap<int, int> &scheme) 3128 { 3129 m_mapHostScreenForGuestScreen = scheme; 3130 3130 m_invalidations << UIActionIndexRT_M_View << UIActionIndexRT_M_ViewPopup; 3131 } 3132 3133 QMap<int, int> UIActionPoolRuntime::hostScreenForGuestScreenMap() const 3134 { 3135 return m_mapHostScreenForGuestScreen; 3131 3136 } 3132 3137 … … 3300 3305 } 3301 3306 3302 void UIActionPoolRuntime::sltHandleActionTriggerView Rescale(QAction *pAction)3307 void UIActionPoolRuntime::sltHandleActionTriggerViewScreenRescale(QAction *pAction) 3303 3308 { 3304 3309 /* Make sure sender is valid: */ … … 3984 3989 /* Get device-pixel-ratio: */ 3985 3990 bool fDevicePixelRatioMentioned = false; 3986 const double dDevicePixelRatioActual = qMin(gpDesktop->devicePixelRatioActual( ),3991 const double dDevicePixelRatioActual = qMin(gpDesktop->devicePixelRatioActual(m_mapHostScreenForGuestScreen.value(iGuestScreenIndex)), 3987 3992 10.0 /* meh, who knows? */); 3988 3993 … … 4045 4050 /* Install listener for exclusive action-group: */ 4046 4051 connect(pActionGroup, &QActionGroup::triggered, 4047 this, &UIActionPoolRuntime::sltHandleActionTriggerView Rescale);4052 this, &UIActionPoolRuntime::sltHandleActionTriggerViewScreenRescale); 4048 4053 } 4049 4054 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h
r76006 r76062 166 166 void setGuestSupportsGraphics(bool fSupports); 167 167 168 /** Defines host-to-guest mapping scheme. */ 169 void setHostScreenForGuestScreenMap(const QMap<int, int> &map); 168 /** Defines host-to-guest mapping @a scheme. */ 169 void setHostScreenForGuestScreenMap(const QMap<int, int> &scheme); 170 /** Returns host-to-guest mapping scheme. */ 171 QMap<int, int> hostScreenForGuestScreenMap() const; 170 172 171 173 /** Returns whether the action with passed @a type is allowed in the 'Machine' menu. */ … … 211 213 void sltHandleActionTriggerViewScreenRemap(QAction *pAction); 212 214 /** Handles 'View' : 'Virtual Screen #' menu : 'Rescale' @a pAction trigger. */ 213 void sltHandleActionTriggerView Rescale(QAction *pAction);215 void sltHandleActionTriggerViewScreenRescale(QAction *pAction); 214 216 215 217 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r76016 r76062 28 28 /* GUI includes: */ 29 29 # include "VBoxGlobal.h" 30 # include "UIActionPoolRuntime.h" 30 31 # include "UIDesktopWidgetWatchdog.h" 31 32 # include "UIExtraDataManager.h" … … 1471 1472 /* Reapply machine-view scale-factor if necessary: */ 1472 1473 applyMachineViewScaleFactor(); 1474 /* For 'normal'/'scaled' visual state type: */ 1475 if ( visualStateType() == UIVisualStateType_Normal 1476 || visualStateType() == UIVisualStateType_Scale) 1477 { 1478 /* Make sure action-pool is of 'runtime' type: */ 1479 UIActionPoolRuntime *pActionPool = actionPool() && actionPool()->toRuntime() ? actionPool()->toRuntime() : 0; 1480 AssertPtr(pActionPool); 1481 if (pActionPool) 1482 { 1483 /* Inform action-pool about current guest-to-host screen mapping: */ 1484 QMap<int, int> screenMap = pActionPool->hostScreenForGuestScreenMap(); 1485 screenMap[m_uScreenId] = m_iHostScreenNumber; 1486 pActionPool->setHostScreenForGuestScreenMap(screenMap); 1487 } 1488 } 1473 1489 } 1474 1490 break;
Note:
See TracChangeset
for help on using the changeset viewer.

