mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Use native text rendering for qml windows
Signed-off-by: Jeremy Plsek <jeremyplsek@gmail.com>
This commit is contained in:
parent
dde4dd78fb
commit
5fa2a13f8d
@ -14,6 +14,7 @@
|
||||
*/
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <cmath>
|
||||
#include <csignal>
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
@ -34,6 +35,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QQuickStyle>
|
||||
#include <QQuickWindow>
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
@ -99,6 +101,15 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||
#else
|
||||
// See https://bugreports.qt.io/browse/QTBUG-70481
|
||||
if (std::fmod(app.devicePixelRatio(), 1) == 0) {
|
||||
QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering);
|
||||
}
|
||||
#endif
|
||||
|
||||
// check a environment variable for core dumps
|
||||
#ifdef Q_OS_UNIX
|
||||
if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user