# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license notice: # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed # with this work for additional information regarding copyright # ownership. The ASF licenses this file to you under the Apache # License, Version 2.0 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # $(eval $(call gb_JunitTest_JunitTest,comphelper_complex)) $(eval $(call gb_JunitTest_use_unoapi_jars,comphelper_complex)) $(eval $(call gb_JunitTest_add_sourcefiles,comphelper_complex,\ comphelper/qa/complex/comphelper/Map \ )) $(eval $(call gb_JunitTest_add_classes,comphelper_complex,\ complex.comphelper.Map \ )) # vim: set noet sw=4 ts=4: t5: Remove "5" from class names in qt5 VCL plugin): > Renaming the headers and source files will be done > in a separate commit to make tracking git history easier. Change-Id: If955e77c8ba508d0a2e01e3a9df1be6dc04c4e4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122806 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> qt5: Remove "5" from class names in qt5 VCL plugin 2021-09-29T11:50:16+00:00 Michael Weghorn m.weghorn@posteo.de 2021-09-28T13:02:47+00:00 dfd3fdfe664e214ca1bba72b96d19b89ff25e7bc Rename classes for the qt5 VCL plugin to no longer contain the Qt version number "5" in them, e.g. "Qt5Widget" -> "QtWidget". Also, adapt some variable names and comments accordingly. The code will be used for an upcoming qt6 VCL plugin as well, so a "Qt" prefix fits better than a "Qt5" one. Renaming the headers and source files will be done in a separate commit to make tracking git history easier. Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122805 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename classes for the qt5 VCL plugin to no longer
contain the Qt version number "5" in them, e.g.
"Qt5Widget" -> "QtWidget".

Also, adapt some variable names and comments
accordingly.

The code will be used for an upcoming qt6 VCL plugin
as well, so a "Qt" prefix fits better than a "Qt5"
one.

Renaming the headers and source files will be done
in a separate commit to make tracking git history easier.

Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122805
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
qt5: Replace use of deprecated QDesktopWidget in Qt5System 2021-09-24T11:58:34+00:00 Michael Weghorn m.weghorn@posteo.de 2021-09-24T06:18:12+00:00 8248d4cd6021614461ae79adcd447d4c35e9fa96 Change-Id: Id6ba8dfcf2f966f0e2e224990dec0309cd4d27d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122551 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: Id6ba8dfcf2f966f0e2e224990dec0309cd4d27d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122551
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
tdf#127687 Qt5 introduce basic HiDPI scaling 2020-03-09T13:19:49+00:00 Luca Carlon carlon.luca@gmail.com 2020-02-29T12:39:29+00:00 358991e3b0a49bb201c2f1e4be900ee99aac9aa8 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>
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>
Silence -Werror,-Wdeprecated-declarations for now 2020-01-14T09:19:25+00:00 Noel Grandin noel.grandin@collabora.co.uk 2020-01-14T07:23:53+00:00 ea10986a0939cacd34e8d3e026579c8ce3e6ac6c ...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>
...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>