diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-01-17 14:01:51 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-01-25 23:44:29 +0100 |
commit | b0b089e8f7a6df793761bdec6ee9d98b1bf12a5a (patch) | |
tree | 99e8dbb61e26d461fc79c61562734a763e2de251 /vcl/qt5/Qt5Graphics_GDI.cxx | |
parent | ed4a2031a8b72d15dbe60ec9dd6fcaed07715be9 (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.cxx | 4 |
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()); } |