Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/virtual/virtual_output.cpp
Show All 36 Lines | |||||
37 | QSize VirtualOutput::pixelSize() const | 37 | QSize VirtualOutput::pixelSize() const | ||
38 | { | 38 | { | ||
39 | return m_pixelSize; | 39 | return m_pixelSize; | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | void VirtualOutput::setGeometry(const QRect &geo) | 42 | void VirtualOutput::setGeometry(const QRect &geo) | ||
43 | { | 43 | { | ||
44 | m_pixelSize = geo.size(); | 44 | m_pixelSize = geo.size(); | ||
45 | setRawPhysicalSize(m_pixelSize); | ||||
davidedmundson: This is in mm.
Which gives this virtual screen a DPI of 25.4, it still works but it's a bit… | |||||
For the tests it does not make a difference, but yea kind of unrealistic. I will push this here as a quick fix, but we should in the future expand this class in general for better tests of (auto-)scaling. With the new structure this should then translate directly to the DRM backend. romangg: For the tests it does not make a difference, but yea kind of unrealistic. I will push this here… | |||||
45 | setGlobalPos(geo.topLeft()); | 46 | setGlobalPos(geo.topLeft()); | ||
46 | } | 47 | } | ||
47 | 48 | | |||
48 | } | 49 | } |
This is in mm.
Which gives this virtual screen a DPI of 25.4, it still works but it's a bit unrealistic.
Might be better to just set an arbitrary sensible QRect.