Have android build use material theme and splash. Fix no context drawer on mobile.
This commit is contained in:
@@ -7,7 +7,7 @@ set(vehiclevoyage_SRCS
|
||||
|
||||
qt5_add_resources(RESOURCES resources.qrc)
|
||||
add_executable(vehiclevoyage ${vehiclevoyage_SRCS} ${RESOURCES})
|
||||
target_link_libraries(vehiclevoyage Qt5::Core Qt5::Qml Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Widgets KF5::CoreAddons)
|
||||
target_link_libraries(vehiclevoyage Qt5::Core Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::Sql Qt5::Svg Qt5::Widgets KF5::CoreAddons)
|
||||
install(TARGETS vehiclevoyage ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
|
||||
@@ -20,6 +20,10 @@ Kirigami.ApplicationWindow {
|
||||
ListElement {value: 5; text: qsTr("Serpentine Belt Changed");}
|
||||
ListElement {value: -1; text: qsTr("Other");}
|
||||
}
|
||||
|
||||
contextDrawer: Kirigami.ContextDrawer {
|
||||
id: contextDrawer
|
||||
}
|
||||
|
||||
Kirigami.PageRouter {
|
||||
id: router
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <QDebug>
|
||||
#include <QSqlQuery>
|
||||
#include <QQmlContext>
|
||||
#include <QtQuickControls2/QQuickStyle>
|
||||
#include "db/sqlvehicle.h"
|
||||
#include "db/sqlservicerecord.h"
|
||||
#include "jsonio.h"
|
||||
@@ -37,6 +38,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
QApplication app(argc, argv);
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
QQuickStyle::setStyle("Material");
|
||||
#endif
|
||||
|
||||
|
||||
KAboutData aboutData("org.eyecreate.vehiclevoyage", "Vehicle Voyage", "1.0", "Track vehicle service history.",KAboutLicense::GPL_V3);//TODO:i18n
|
||||
|
||||
6
src/qtquickcontrols2.conf
Normal file
6
src/qtquickcontrols2.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
[Material]
|
||||
Primary=Indigo
|
||||
Accent=Amber
|
||||
Theme=System
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
<file alias="main.qml">contents/ui/main.qml</file>
|
||||
<file alias="speed.svg">contents/speed.svg</file>
|
||||
<file alias="license.svg">contents/license.svg</file>
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user