From bc57e18a9a6a8ddf43f412ea86914e98a1257064 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker Date: Tue, 30 Jun 2020 18:47:49 -0400 Subject: [PATCH] Use material styling on android and package icon for about page. --- src/CMakeLists.txt | 2 +- src/main.cpp | 7 ++++++- src/resources.qrc | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fabc210..f934651 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,5 +12,5 @@ endif() qt5_add_resources(RESOURCES resources.qrc) add_executable(qiflora ${qiflora_SRCS} ${RESOURCES}) -target_link_libraries(qiflora Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg Qt5::Bluetooth Qt5::Charts KF5::CoreAddons) +target_link_libraries(qiflora Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Svg Qt5::Bluetooth Qt5::Charts KF5::CoreAddons) install(TARGETS qiflora ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/src/main.cpp b/src/main.cpp index 5e06a49..b1aa1e2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,12 +6,17 @@ #include "miflora/bluetoothdevices.h" #include #include +#include Q_DECL_EXPORT int main(int argc, char *argv[]) { QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication app(argc, argv); +#ifdef Q_OS_ANDROID + QQuickStyle::setStyle("Material"); +#endif + KAboutData aboutData("org.eyecreate.qiflora", "QiFlora", "1.1.2", "Mobile friendly application to monitor Mi Flora devices.",KAboutLicense::GPL_V3);//TODO:i18n aboutData.setProductName("qiflora"); aboutData.addAuthor("Kevin Whitaker",QString(),"eyecreate@eyecreate.org","https://www.eyecreate.org"); @@ -21,7 +26,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) QCoreApplication::setOrganizationDomain("eyecreate.org"); QCoreApplication::setApplicationName(aboutData.productName()); QCoreApplication::setApplicationVersion(aboutData.version()); - app.setWindowIcon(QIcon::fromTheme("org.eyecreate.qiflora")); + app.setWindowIcon(QIcon(":/logo.svg")); QQmlApplicationEngine engine; diff --git a/src/resources.qrc b/src/resources.qrc index b2b45f8..b61b903 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -1,5 +1,6 @@ contents/ui/main.qml + ../packaging/org.eyecreate.qiflora.svg -- GitLab