Changeset 53860 in vbox
- Timestamp:
- Jan 19, 2015 6:18:58 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r53859 r53860 62 62 , m_fUnused(false) 63 63 , m_fAutoEnabled(false) 64 , m_dScaleFactor(gEDataManager->scaleFactor(vboxGlobal().managedVMUuid())) 65 , m_fUseUnscaledHiDPIOutput(gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid())) 64 , m_dScaleFactor(1.0) 65 , m_dBackingScaleFactor(1.0) 66 , m_fUseUnscaledHiDPIOutput(false) 66 67 , m_hiDPIOptimizationType(HiDPIOptimizationType_None) 67 , m_dBackingScaleFactor(1.0)68 68 { 69 69 /* Update coordinate-system: */ … … 695 695 696 696 unlock(); 697 698 /* Update scaled-size according scale-factor: */ 699 setScaledSize(scaleFactor() == 1.0 ? scaledSize() : QSize(m_iWidth * scaleFactor(), m_iHeight * scaleFactor())); 697 700 } 698 701 … … 772 775 773 776 /* Update scaled-size according scale-factor: */ 774 setScaledSize( m_dScaleFactor == 1.0 ? QSize() : QSize(m_iWidth * dScaleFactor, m_iHeight * dScaleFactor));777 setScaledSize(scaleFactor() == 1.0 ? QSize() : QSize(m_iWidth * scaleFactor(), m_iHeight * scaleFactor())); 775 778 776 779 /* Update coordinate-system: */ … … 975 978 QPixmap subPixmap = QPixmap(rect.width(), rect.height()); 976 979 977 /* If HiDPI 'backing scalefactor' defined: */980 /* If HiDPI 'backing-scale-factor' defined: */ 978 981 if (dBackingScaleFactor > 1.0) 979 982 { … … 1035 1038 QPixmap subPixmap = QPixmap::fromImage(subImage); 1036 1039 1037 /* If HiDPI 'backing scalefactor' defined: */1040 /* If HiDPI 'backing-scale-factor' defined: */ 1038 1041 if (dBackingScaleFactor > 1.0) 1039 1042 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r53859 r53860 214 214 #endif /* VBOX_WITH_VIDEOHWACCEL */ 215 215 216 /** Returns the scale-factor used by the frame-buffer. */ 217 double scaleFactor() const { return m_dScaleFactor; } 218 /** Define the scale-factor used by the frame-buffer. */ 219 void setScaleFactor(double dScaleFactor); 220 221 /** Returns backing-scale-factor used by HiDPI frame-buffer. */ 222 double backingScaleFactor() const { return m_dBackingScaleFactor; } 223 /** Defines backing-scale-factor used by HiDPI frame-buffer. */ 224 void setBackingScaleFactor(double dBackingScaleFactor); 225 216 226 /** Returns whether frame-buffer should use unscaled HiDPI output. */ 217 227 bool useUnscaledHiDPIOutput() const { return m_fUseUnscaledHiDPIOutput; } … … 221 231 /** Define HiDPI frame-buffer optimization type: */ 222 232 void setHiDPIOptimizationType(HiDPIOptimizationType optimizationType) { m_hiDPIOptimizationType = optimizationType; } 223 224 /** Returns the scale-factor used by the frame-buffer. */225 double scaleFactor() const { return m_dScaleFactor; }226 /** Define the scale-factor used by the frame-buffer. */227 void setScaleFactor(double dScaleFactor);228 229 /** Return backing scale factor used by HiDPI frame-buffer. */230 double backingScaleFactor() const { return m_dBackingScaleFactor; }231 /** Define backing scale factor used by HiDPI frame-buffer. */232 void setBackingScaleFactor(double dBackingScaleFactor);233 233 234 234 protected slots: … … 330 330 /** @name HiDPI screens related variables. 331 331 * @{ */ 332 /** Holds backing-scale-factor used by HiDPI frame-buffer. */ 333 double m_dBackingScaleFactor; 332 334 /** Holds whether frame-buffer should use unscaled HiDPI output. */ 333 335 bool m_fUseUnscaledHiDPIOutput; 334 336 /** Holds HiDPI frame-buffer optimization type. */ 335 337 HiDPIOptimizationType m_hiDPIOptimizationType; 336 /** Holds backing scale factor used by HiDPI frame-buffer. */337 double m_dBackingScaleFactor;338 338 /** @} */ 339 339
Note:
See TracChangeset
for help on using the changeset viewer.