forked from qt-creator/qt-creator
OS X: Welcome/QQuickWidget fixes
The rendered text is still ugly, but the fuzzy text is better than the alternative currently. Change-Id: Id9e54fb406ee964e0b9b5c40b7a8108b45c15f85 Task-number: QTBUG-42861 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
renderType: Text.NativeRendering
|
renderType: useNativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
Accessible.name: text
|
Accessible.name: text
|
||||||
Accessible.role: Accessible.StaticText
|
Accessible.role: Accessible.StaticText
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -415,6 +415,9 @@ MacWebKitHelpWidget::MacWebKitHelpWidget(MacWebKitHelpViewer *parent)
|
|||||||
{
|
{
|
||||||
AutoreleasePool pool; Q_UNUSED(pool)
|
AutoreleasePool pool; Q_UNUSED(pool)
|
||||||
d->m_webView = [[MyWebView alloc] init];
|
d->m_webView = [[MyWebView alloc] init];
|
||||||
|
// Turn layered rendering on.
|
||||||
|
// Otherwise the WebView will render empty after any QQuickWidget was shown.
|
||||||
|
d->m_webView.wantsLayer = YES;
|
||||||
d->m_frameLoadDelegate = [[FrameLoadDelegate alloc] initWithMainFrame:d->m_webView.mainFrame
|
d->m_frameLoadDelegate = [[FrameLoadDelegate alloc] initWithMainFrame:d->m_webView.mainFrame
|
||||||
viewer:parent];
|
viewer:parent];
|
||||||
[d->m_webView setFrameLoadDelegate:d->m_frameLoadDelegate];
|
[d->m_webView setFrameLoadDelegate:d->m_frameLoadDelegate];
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ WelcomeMode::WelcomeMode()
|
|||||||
#endif // USE_QUICK_WIDGET
|
#endif // USE_QUICK_WIDGET
|
||||||
|
|
||||||
connect(PluginManager::instance(), SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));
|
connect(PluginManager::instance(), SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));
|
||||||
|
|
||||||
setWidget(m_modeWidget);
|
setWidget(m_modeWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,6 +259,13 @@ void WelcomeMode::initPlugins()
|
|||||||
connect(Core::ICore::instance(), &Core::ICore::themeChanged, this, &WelcomeMode::onThemeChanged);
|
connect(Core::ICore::instance(), &Core::ICore::themeChanged, this, &WelcomeMode::onThemeChanged);
|
||||||
ctx->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
|
ctx->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
|
||||||
|
|
||||||
|
#if defined(USE_QUICK_WIDGET)
|
||||||
|
bool useNativeText = !Utils::HostOsInfo::isMacHost();
|
||||||
|
#else
|
||||||
|
bool useNativeText = true;
|
||||||
|
#endif
|
||||||
|
ctx->setContextProperty(QLatin1String("useNativeText"), useNativeText);
|
||||||
|
|
||||||
QString path = resourcePath() + QLatin1String("/welcomescreen/welcomescreen.qml");
|
QString path = resourcePath() + QLatin1String("/welcomescreen/welcomescreen.qml");
|
||||||
|
|
||||||
// finally, load the root page
|
// finally, load the root page
|
||||||
|
|||||||
Reference in New Issue
Block a user