- Timestamp:
- Dec 5, 2014 2:11:39 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r53450 r53461 3096 3096 } 3097 3097 3098 void UIExtraDataManager::setUseUnscaledHiDPIOutput(bool fUseUnscaledHiDPIOutput, const QString &strID) 3099 { 3100 /* 'True' if feature allowed, null-string otherwise: */ 3101 return setExtraDataString(GUI_HiDPI_UnscaledOutput, toFeatureAllowed(fUseUnscaledHiDPIOutput), strID); 3102 } 3103 3098 3104 HiDPIOptimizationType UIExtraDataManager::hiDPIOptimizationType(const QString &strID) 3099 3105 { … … 3582 3588 else if (strKey == GUI_ScaleFactor) 3583 3589 emit sigScaleFactorChange(strMachineID); 3590 else if (strKey == GUI_HiDPI_UnscaledOutput) 3591 emit sigUnscaledHiDPIOutputModeChange(strMachineID); 3584 3592 } 3585 3593 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r53447 r53461 80 80 81 81 #ifdef RT_OS_DARWIN 82 /** Mac OS X: Notifies about unscaled HiDPI output mode change. */ 83 void sigUnscaledHiDPIOutputModeChange(const QString &strMachineID); 84 82 85 /** Mac OS X: Notifies about 'presentation mode' status change. */ 83 86 void sigPresentationModeChange(bool fEnabled); … … 396 399 /** Returns whether Runtime UI should use unscaled HiDPI output. */ 397 400 bool useUnscaledHiDPIOutput(const QString &strID); 401 /** Defines whether Runtime UI should @a fUseUnscaledHiDPIOutput. */ 402 void setUseUnscaledHiDPIOutput(bool fUseUnscaledHiDPIOutput, const QString &strID); 398 403 399 404 /** Returns Runtime UI HiDPI optimization type. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r53447 r53461 775 775 } 776 776 777 #ifdef RT_OS_DARWIN 778 void UIFrameBuffer::sltHandleUnscaledHiDPIOutputModeChange(const QString &strMachineID) 779 { 780 /* Skip unrelated machine IDs: */ 781 if (strMachineID != vboxGlobal().managedVMUuid()) 782 return; 783 784 /* Fetch new unscaled HiDPI output mode value: */ 785 m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()); 786 } 787 #endif /* RT_OS_DARWIN */ 788 777 789 void UIFrameBuffer::prepareConnections() 778 790 { … … 794 806 connect(gEDataManager, SIGNAL(sigScaleFactorChange(const QString&)), 795 807 this, SLOT(sltHandleScaleFactorChange(const QString&))); 808 #ifdef Q_WS_MAC 809 connect(gEDataManager, SIGNAL(sigUnscaledHiDPIOutputModeChange(const QString&)), 810 this, SLOT(sltHandleUnscaledHiDPIOutputModeChange(const QString&))); 811 #endif /* Q_WS_MAC */ 796 812 } 797 813 … … 811 827 disconnect(gEDataManager, SIGNAL(sigScaleFactorChange(const QString&)), 812 828 this, SLOT(sltHandleScaleFactorChange(const QString&))); 829 #ifdef Q_WS_MAC 830 disconnect(gEDataManager, SIGNAL(sigUnscaledHiDPIOutputModeChange(const QString&)), 831 this, SLOT(sltHandleUnscaledHiDPIOutputModeChange(const QString&))); 832 #endif /* Q_WS_MAC */ 813 833 } 814 834 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r53447 r53461 230 230 /** Handles the scale-factor change. */ 231 231 void sltHandleScaleFactorChange(const QString &strMachineID); 232 233 #ifdef RT_OS_DARWIN 234 /** Mac OS X: Handles the unscaled HiDPI output mode change. */ 235 void sltHandleUnscaledHiDPIOutputModeChange(const QString &strMachineID); 236 #endif /* RT_OS_DARWIN */ 232 237 233 238 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r53447 r53461 360 360 adjustGuestScreenSize(); 361 361 } 362 363 #ifdef RT_OS_DARWIN 364 void UIMachineView::sltHandleUnscaledHiDPIOutputModeChange(const QString &strMachineID) 365 { 366 /* Skip unrelated machine IDs: */ 367 if (strMachineID != vboxGlobal().managedVMUuid()) 368 return; 369 370 /* Adjust frame-buffer, machine-window and guest-screen size if necessary: */ 371 sltHandleNotifyChange(frameBuffer()->width(), frameBuffer()->height()); 372 machineWindow()->normalizeGeometry(true /* adjust position */); 373 adjustGuestScreenSize(); 374 } 375 #endif /* RT_OS_DARWIN */ 362 376 363 377 void UIMachineView::sltMachineStateChanged() … … 586 600 connect(gEDataManager, SIGNAL(sigScaleFactorChange(const QString&)), 587 601 this, SLOT(sltHandleScaleFactorChange(const QString&))); 602 #ifdef Q_WS_MAC 603 /* Unscaled HiDPI output mode change: */ 604 connect(gEDataManager, SIGNAL(sigUnscaledHiDPIOutputModeChange(const QString&)), 605 this, SLOT(sltHandleUnscaledHiDPIOutputModeChange(const QString&))); 606 #endif /* Q_WS_MAC */ 588 607 } 589 608 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r53389 r53461 116 116 /** Handles the scale-factor change. */ 117 117 void sltHandleScaleFactorChange(const QString &strMachineID); 118 119 #ifdef RT_OS_DARWIN 120 /** Mac OS X: Handles the unscaled HiDPI output mode change. */ 121 void sltHandleUnscaledHiDPIOutputModeChange(const QString &strMachineID); 122 #endif /* RT_OS_DARWIN */ 118 123 119 124 /* Console callback handlers: */
Note:
See TracChangeset
for help on using the changeset viewer.