diff options
author | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-14 10:25:01 +0300 |
---|---|---|
committer | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-14 10:27:21 +0300 |
commit | 97863a4992276a3d1aeb3c1bb9ef5a280a5e8b12 (patch) | |
tree | b38f6f152e7036b91c25834a917e320955660db2 /basicsuite/shared | |
parent | 8be609623fc646e8d9642fc8481a1b9e59fb8417 (diff) | |
parent | aa8e21cc3f60e54dd9c5d1ec482ca440857568f0 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
* origin/5.11:
aa8e21c Add new Qt3D demo
ca03367 Exclude demos from colibri imx6ull
a5345fd qtwebbrowser: merge changes from qtwebbrowser git repo
d7e9731 do not enable highdpiscaling on emulator
f730907 Fix mediaplayer default video path
09aa32d Fix some major scaling & font issues on ebike-demo
Change-Id: I044c29ea2908a6254f32b0623037ea63f23d25cb
Diffstat (limited to 'basicsuite/shared')
-rw-r--r-- | basicsuite/shared/fonts.qrc | 14 | ||||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Montserrat-Bold.ttf | bin | 0 -> 191648 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Montserrat-Light.ttf | bin | 0 -> 192116 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Montserrat-Medium.ttf | bin | 0 -> 192488 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Montserrat-Regular.ttf | bin | 0 -> 190648 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Teko-Bold.ttf | bin | 0 -> 305800 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Teko-Light.ttf | bin | 0 -> 301528 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Teko-Medium.ttf | bin | 0 -> 310028 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/Teko-Regular.ttf | bin | 0 -> 311780 bytes | |||
-rw-r--r-- | basicsuite/shared/fonts/ebike-fonts/fontawesome-webfont.ttf | bin | 0 -> 165548 bytes | |||
-rw-r--r-- | basicsuite/shared/main.cpp | 49 | ||||
-rw-r--r-- | basicsuite/shared/shared.pri | 14 |
12 files changed, 43 insertions, 34 deletions
diff --git a/basicsuite/shared/fonts.qrc b/basicsuite/shared/fonts.qrc index 13b8cb2..ccc8864 100644 --- a/basicsuite/shared/fonts.qrc +++ b/basicsuite/shared/fonts.qrc @@ -2,14 +2,18 @@ <qresource prefix="/"> <file>fonts/TitilliumWeb-Black.ttf</file> <file>fonts/TitilliumWeb-Bold.ttf</file> - <file>fonts/TitilliumWeb-BoldItalic.ttf</file> <file>fonts/TitilliumWeb-ExtraLight.ttf</file> - <file>fonts/TitilliumWeb-ExtraLightItalic.ttf</file> - <file>fonts/TitilliumWeb-Italic.ttf</file> <file>fonts/TitilliumWeb-Light.ttf</file> - <file>fonts/TitilliumWeb-LightItalic.ttf</file> <file>fonts/TitilliumWeb-Regular.ttf</file> <file>fonts/TitilliumWeb-SemiBold.ttf</file> - <file>fonts/TitilliumWeb-SemiBoldItalic.ttf</file> + <file>fonts/ebike-fonts/fontawesome-webfont.ttf</file> + <file>fonts/ebike-fonts/Montserrat-Bold.ttf</file> + <file>fonts/ebike-fonts/Montserrat-Light.ttf</file> + <file>fonts/ebike-fonts/Montserrat-Medium.ttf</file> + <file>fonts/ebike-fonts/Montserrat-Regular.ttf</file> + <file>fonts/ebike-fonts/Teko-Bold.ttf</file> + <file>fonts/ebike-fonts/Teko-Light.ttf</file> + <file>fonts/ebike-fonts/Teko-Medium.ttf</file> + <file>fonts/ebike-fonts/Teko-Regular.ttf</file> </qresource> </RCC> diff --git a/basicsuite/shared/fonts/ebike-fonts/Montserrat-Bold.ttf b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Bold.ttf Binary files differnew file mode 100644 index 0000000..8e9a5f3 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Bold.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Montserrat-Light.ttf b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Light.ttf Binary files differnew file mode 100644 index 0000000..e66dc5b --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Light.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Montserrat-Medium.ttf b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Medium.ttf Binary files differnew file mode 100644 index 0000000..88d70b8 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Medium.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Montserrat-Regular.ttf b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Regular.ttf Binary files differnew file mode 100644 index 0000000..626355a --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Montserrat-Regular.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Teko-Bold.ttf b/basicsuite/shared/fonts/ebike-fonts/Teko-Bold.ttf Binary files differnew file mode 100644 index 0000000..d061824 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Teko-Bold.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Teko-Light.ttf b/basicsuite/shared/fonts/ebike-fonts/Teko-Light.ttf Binary files differnew file mode 100644 index 0000000..ec5194a --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Teko-Light.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Teko-Medium.ttf b/basicsuite/shared/fonts/ebike-fonts/Teko-Medium.ttf Binary files differnew file mode 100644 index 0000000..cc38086 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Teko-Medium.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/Teko-Regular.ttf b/basicsuite/shared/fonts/ebike-fonts/Teko-Regular.ttf Binary files differnew file mode 100644 index 0000000..3161e63 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/Teko-Regular.ttf diff --git a/basicsuite/shared/fonts/ebike-fonts/fontawesome-webfont.ttf b/basicsuite/shared/fonts/ebike-fonts/fontawesome-webfont.ttf Binary files differnew file mode 100644 index 0000000..35acda2 --- /dev/null +++ b/basicsuite/shared/fonts/ebike-fonts/fontawesome-webfont.ttf diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 4afbbe4..e682c67 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of Qt for Device Creation. @@ -79,7 +79,12 @@ int main(int argc, char **argv) qputenv("QT_QUICK_CONTROLS_CONF", "/data/user/qt/qtquickcontrols2/qtquickcontrols2.conf"); QIcon::setThemeName("gallery"); QIcon::setThemeSearchPaths(QStringList() << "/data/user/qt/qtquickcontrols2/icons"); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + + // Do not set HighDpiScaling for emulator, see QTBUG-64815 + if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) { + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + } + QApplication app(argc, argv); #if defined(USE_QTWEBENGINE) @@ -95,15 +100,15 @@ int main(int argc, char **argv) QFontDatabase::addApplicationFont(":/fonts/TitilliumWeb-Black.ttf"); //For eBike demo - QFontDatabase::addApplicationFont(":/fonts/Montserrat-Bold.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Montserrat-Light.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Montserrat-Medium.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Montserrat-Regular.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Teko-Bold.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Teko-Light.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Teko-Medium.ttf"); - QFontDatabase::addApplicationFont(":/fonts/Teko-Regular.ttf"); - QFontDatabase::addApplicationFont(":/fonts/fontawesome-webfont.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Montserrat-Bold.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Montserrat-Light.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Montserrat-Medium.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Montserrat-Regular.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Teko-Bold.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Teko-Light.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Teko-Medium.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/Teko-Regular.ttf"); + QFontDatabase::addApplicationFont(":/fonts/ebike-fonts/fontawesome-webfont.ttf"); QString path = app.applicationDirPath(); @@ -135,10 +140,6 @@ int main(int argc, char **argv) QGuiApplication::setFont(font); } - QString videosPath = QStringLiteral("file://"); - QString defaultVideoUrl = QStringLiteral("file:///data/videos/Qt_video_720p.webm"); - videosPath.append("/data/videos"); - QSettings styleSettings; QString style = styleSettings.value("style").toString(); if (style.isEmpty() || style == "Default") @@ -153,17 +154,17 @@ int main(int argc, char **argv) applicationengine.rootContext()->setContextProperty("appFont", appFont); applicationengine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles()); - applicationengine.rootContext()->setContextProperty("VideosLocation", videosPath); - applicationengine.rootContext()->setContextProperty("DefaultVideoUrl", defaultVideoUrl); + QSettings demoSettings("Boot2Qt-demos", "demoSettings"); - QSettings themeColorSettings("QtLauncher", "colorSettings"); + applicationengine.rootContext()->setContextProperty("_backgroundColor", demoSettings.value("backgroundColor", "#09102b")); + applicationengine.rootContext()->setContextProperty("_primaryGreen", demoSettings.value("primaryGreen", "#41cd52")); + applicationengine.rootContext()->setContextProperty("_mediumGreen", demoSettings.value("mediumGreen", "#21be2b")); + applicationengine.rootContext()->setContextProperty("_darkGreen", demoSettings.value("darkGreen", "#17a81a")); + applicationengine.rootContext()->setContextProperty("_primaryGrey", demoSettings.value("primaryGrey", "#9d9faa")); + applicationengine.rootContext()->setContextProperty("_secondaryGrey", demoSettings.value("secondaryGrey", "#3a4055")); - applicationengine.rootContext()->setContextProperty("_backgroundColor", themeColorSettings.value("backgroundColor", "#09102b")); - applicationengine.rootContext()->setContextProperty("_primaryGreen", themeColorSettings.value("primaryGreen", "#41cd52")); - applicationengine.rootContext()->setContextProperty("_mediumGreen", themeColorSettings.value("mediumGreen", "#21be2b")); - applicationengine.rootContext()->setContextProperty("_darkGreen", themeColorSettings.value("darkGreen", "#17a81a")); - applicationengine.rootContext()->setContextProperty("_primaryGrey", themeColorSettings.value("primaryGrey", "#9d9faa")); - applicationengine.rootContext()->setContextProperty("_secondaryGrey", themeColorSettings.value("secondaryGrey", "#3a4055")); + applicationengine.rootContext()->setContextProperty("VideosLocation", demoSettings.value("videosLocation", "file:///data/videos")); + applicationengine.rootContext()->setContextProperty("DefaultVideoUrl", demoSettings.value("defaultVideoUrl", "file:///data/videos/Qt+for+Designers+and+Developers.mp4")); applicationengine.load(QUrl::fromLocalFile(path + "/SharedMain.qml")); diff --git a/basicsuite/shared/shared.pri b/basicsuite/shared/shared.pri index 223bb02..50772d0 100644 --- a/basicsuite/shared/shared.pri +++ b/basicsuite/shared/shared.pri @@ -28,15 +28,19 @@ defineTest(b2qtdemo_deploy_defaults) { DISTFILES += $$PWD/fonts/TitilliumWeb-Black.ttf \ $$PWD/fonts/TitilliumWeb-Bold.ttf \ - $$PWD/fonts/TitilliumWeb-BoldItalic.ttf \ $$PWD/fonts/TitilliumWeb-ExtraLight.ttf \ - $$PWD/fonts/TitilliumWeb-ExtraLightItalic.ttf \ - $$PWD/fonts/TitilliumWeb-Italic.ttf \ $$PWD/fonts/TitilliumWeb-Light.ttf \ - $$PWD/fonts/TitilliumWeb-LightItalic.ttf \ $$PWD/fonts/TitilliumWeb-Regular.ttf \ $$PWD/fonts/TitilliumWeb-SemiBold.ttf \ - $$PWD/fonts/TitilliumWeb-SemiBoldItalic.ttf + $$PWD/fonts/ebike-fonts/fontawesome-webfont.ttf \ + $$PWD/fonts/ebike-fonts/Montserrat-Bold.ttf \ + $$PWD/fonts/ebike-fonts/Montserrat-Light.ttf \ + $$PWD/fonts/ebike-fonts/Montserrat-Medium.ttf \ + $$PWD/fonts/ebike-fonts/Montserrat-Regular.ttf \ + $$PWD/fonts/ebike-fonts/Teko-Bold.ttf \ + $$PWD/fonts/ebike-fonts/Teko-Light.ttf \ + $$PWD/fonts/ebike-fonts/Teko-Medium.ttf \ + $$PWD/fonts/ebike-fonts/Teko-Regular.ttf RESOURCES += \ $$PWD/fonts.qrc |