summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Graphics_GDI.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-01-17 14:01:51 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-01-25 23:44:29 +0100
commitb0b089e8f7a6df793761bdec6ee9d98b1bf12a5a (patch)
tree99e8dbb61e26d461fc79c61562734a763e2de251 /vcl/qt5/Qt5Graphics_GDI.cxx
parented4a2031a8b72d15dbe60ec9dd6fcaed07715be9 (diff)
Qt5/KDE5 use logicalDotsPerInch to report DPI
It looks like all other backend don't use the physical, but the logical DPI to report the resolution. So use the QScreens logical resolution when reporting the DPI values. Also use QScreen for KDE5, as the Svp defaults to 96. This might fix tdf#122131, but since I can't reproduce... Change-Id: Iefc75acf26f8664f2a9ad995edbdc749be2228cf Reviewed-on: https://gerrit.libreoffice.org/66525 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5Graphics_GDI.cxx')
-rw-r--r--vcl/qt5/Qt5Graphics_GDI.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx
index 156c487ad57d..90baba36d3f0 100644
--- a/vcl/qt5/Qt5Graphics_GDI.cxx
+++ b/vcl/qt5/Qt5Graphics_GDI.cxx
@@ -643,8 +643,8 @@ void Qt5Graphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)
return;
QScreen* pScreen = m_pFrame->GetQWidget()->window()->windowHandle()->screen();
- rDPIX = pScreen->physicalDotsPerInchX();
- rDPIY = pScreen->physicalDotsPerInchY();
+ rDPIX = pScreen->logicalDotsPerInchX();
+ rDPIY = pScreen->logicalDotsPerInchY();
}
sal_uInt16 Qt5Graphics::GetBitCount() const { return getFormatBits(m_pQImage->format()); }