diff --git a/fannyapp.pro b/fannyapp.pro index ea18781..c420543 100644 --- a/fannyapp.pro +++ b/fannyapp.pro @@ -1,7 +1,7 @@ QT += qml quick quickcontrols2 widgets CONFIG += c++11 -VERSION = 1.0.1 +VERSION = 1.0.2 # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked deprecated (the exact warnings @@ -17,8 +17,6 @@ DEFINES += QT_DEPRECATED_WARNINGS TEMPLATE = app TARGET = fannyapp -ICON = shared/graphics/favicon.icns - SOURCES += \ sources/filehelper.cpp \ sources/serverconn.cpp \ @@ -73,11 +71,20 @@ ios { OBJECTIVE_SOURCES += \ sources/ios/docviewcontroller.mm \ + sources/ios/notch.mm \ sources/ios/iosshareutils.mm HEADERS += \ headers/ios/docviewcontroller.hpp \ + headers/ios/notch.h \ headers/ios/iosshareutils.hpp + + QT += gui-private +} + +osx { + +ICON = shared/graphics/favicon.icns } DISTFILES += \ diff --git a/headers/ios/notch.h b/headers/ios/notch.h new file mode 100644 index 0000000..6cf16d0 --- /dev/null +++ b/headers/ios/notch.h @@ -0,0 +1,12 @@ +#ifndef NOTCH_H +#define NOTCH_H + +#include + +class Notch : public QObject{ + Q_OBJECT +public: + Notch(); +}; + +#endif diff --git a/qml/Pages/LoginPage.qml b/qml/Pages/LoginPage.qml index eb9fb1f..64c5c87 100644 --- a/qml/Pages/LoginPage.qml +++ b/qml/Pages/LoginPage.qml @@ -135,15 +135,19 @@ Page { left: parent.left leftMargin: root.width * 0.05 right: parent.right - rightMargin: root.width * 0.05 + rightMargin: root.width * 0.05 + passwordHideShow.width * 1.1 } + rightPadding: passwordHideShow.width + CompatibleToolButton{ id: passwordHideShow + anchors { top: parent.top bottom: parent.bottom right: parent.right + rightMargin: -width * 1.1 } icon.color: app.style.style.textColor @@ -231,6 +235,8 @@ Page { anchors.horizontalCenter: parent.horizontalCenter + visible: Qt.platform.os !== "ios" + height: formCol.rowHeight verticalAlignment: Text.AlignVCenter diff --git a/qml/main.qml b/qml/main.qml index b546ea5..690b450 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -32,6 +32,8 @@ ApplicationWindow { width: 540 height: 960 + + Item { id: app @@ -69,6 +71,10 @@ ApplicationWindow { AppStyle { id: style + + onStyleChanged: { + + } } Material.theme: app.style.style.nameMaterialStyle === "Dark" ? Material.Dark:Material.Light diff --git a/sources/ios/notch.mm b/sources/ios/notch.mm new file mode 100644 index 0000000..c52e84e --- /dev/null +++ b/sources/ios/notch.mm @@ -0,0 +1,17 @@ +#include +#include +#include "headers/ios/notch.h" + +Notch::Notch() +{ + //Top + //UIView *statusBar = (UIView *)[[UIApplication sharedApplication] valueForKey:@"statusBar"]; + //statusBar.backgroundColor = [UIColor colorWithRed:0.09 green:0.14 blue:0.19 alpha:1.0]; + + //Bottom + //UIApplication *app = [UIApplication sharedApplication]; + //[app set] + //app.windows.firstObject.backgroundColor = [UIColor whiteColor]; + //app.windows.firstObject.tintColor = [UIColor blackColor]; + +} diff --git a/sources/main.cpp b/sources/main.cpp index 1bb4835..9d60304 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -41,6 +41,7 @@ #include "headers/eventmodel.h" #include "headers/filtermodel.h" #include "headers/appstyle.h" +#include "headers/ios/notch.h" int main(int argc, char *argv[]) { @@ -67,6 +68,12 @@ int main(int argc, char *argv[]) QQmlApplicationEngine engine; QQmlContext *context = engine.rootContext(); + +#if defined(Q_OS_IOS) + Notch pNotchController; + context->setContextProperty("_cppNotchController", &pNotchController); +#endif + context->setContextProperty("_cppAppSettings", pAppSettings); context->setContextProperty("QtCompatiblityMode", #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) )