From e33b0118b402224e75cb7bd6468d719312505b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 24 Mar 2017 14:29:03 +0100 Subject: Rename QBasicFontDatabase to QFreeTypeFontDatabase which is what it is Change-Id: I8def2f7ae1e4c8d8a3e1f8e60549da5d691e4fb3 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/offscreen/qoffscreenintegration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/offscreen') diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp index 56e6075cb2..0c39950019 100644 --- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp @@ -49,7 +49,7 @@ #include #endif #elif defined(Q_OS_WIN) -#include +#include #ifndef Q_OS_WINRT #include #else @@ -103,7 +103,7 @@ QOffscreenIntegration::QOffscreenIntegration() m_fontDatabase.reset(new QGenericUnixFontDatabase()); #endif #elif defined(Q_OS_WIN) - m_fontDatabase.reset(new QBasicFontDatabase()); + m_fontDatabase.reset(new QFreeTypeFontDatabase()); #endif #ifndef QT_NO_DRAGANDDROP -- cgit v1.2.3 From 0624085b73ff4d6537e3dd406f6b3701806626d0 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Thu, 30 Mar 2017 11:58:37 +0300 Subject: Don't set margin on offscreen window if it has a parent Offscreen platform had window frame margins set to 2 by default unless Qt::FramelessWindowHint had been set. Margins must not be set to 2 if the window has a parent. This change fixes two tests in tst_QWindowContainer for offscreen platform. Change-Id: Ib1577c301ea3a3b240bfa7c46ff12510dd2bcef0 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/offscreen/qoffscreenwindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/offscreen') diff --git a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp index 892168a1dc..81f262f9ed 100644 --- a/src/plugins/platforms/offscreen/qoffscreenwindow.cpp +++ b/src/plugins/platforms/offscreen/qoffscreenwindow.cpp @@ -157,10 +157,13 @@ QMargins QOffscreenWindow::frameMargins() const void QOffscreenWindow::setFrameMarginsEnabled(bool enabled) { - if (enabled && !(window()->flags() & Qt::FramelessWindowHint)) + if (enabled + && !(window()->flags() & Qt::FramelessWindowHint) + && (parent() == nullptr)) { m_margins = QMargins(2, 2, 2, 2); - else + } else { m_margins = QMargins(0, 0, 0, 0); + } } void QOffscreenWindow::setWindowState(Qt::WindowState state) -- cgit v1.2.3