summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5System.cxx
AgeCommit message (Collapse)Author
2020-03-09tdf#127687 Qt5 introduce basic HiDPI scalingLuca Carlon
For tdf#124292, Qt's own HiDPI scaling was explicitly disabled, but it turns out, you can't really scale QStyle painting then. This patch series had a 2nd approach also used by Gtk+ currently, which relied on the scaling of ths Cairo surface, which works surprisingly good, but has to lie about the real DPI value, so nothing is scaled twice. Also all icons are then scaled instead of rendered with the proper resolution. When HiDPI support in Qt is enabled, and the application is started using QT_SCALE_FACTOR=1.25, Qt simply lowers the reported resolution, keeps the logical DPI value of 96 and changes the devicePixelRatio to the specified value. But LO still expects the real DPI values and sizes, so we have to multiply a lot of rectangles, sizes and positions. The current result is far from perfect, which you can see with the various graphics glitches, but it at least doesn't crash anymore in the ControlType::Editbox sizing code. The main problem is all the up and downscaling in the getNativeControlRegion code, so LO knows the size of the widgets for the correct layouting, since there seem to be no API to get the scaled values from Qt / QStyle. Change-Id: I687b1df6ef27724ce68326d256e9addccd72e759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86239 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-01-14Silence -Werror,-Wdeprecated-declarations for nowNoel Grandin
...as seen with qt5 5.13.2-1.fc31 /home/noel/libo2/vcl/qt5/Qt5System.cxx:18:83: error: 'screenCount' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations] ^ /home/noel/libo2/vcl/qt5/Qt5System.cxx:22:44: error: 'screenGeometry' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations] QRect qRect = QApplication::desktop()->screenGeometry(nScreen); ^ Change-Id: I73385b56f58284fedf5acbfb914177e06f3512d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86736 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05kde5: cleanup cargo-culted empty dtorsThorsten Behrens
Change-Id: I8f987e30b2a78e173fd8f3ebb9f33e4720f6588b Reviewed-on: https://gerrit.libreoffice.org/60011 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-07-09Implement reading screen count and screen geometryKatarina Behrens
this improves restoring window location should it be within the secondary screen Change-Id: Iaac6bcead6bfcb7ae9eda579e5a4ad6b2482cc39
2018-07-09Basic Qt5 system display dataKatarina Behrens
copied from dummy headless implementation Change-Id: I1b184745627acd065b4c0cc54f044c47ec980c93