changed the password field to not overlap the eye icon

This commit is contained in:
dorian 2020-01-25 11:15:37 +01:00
parent a3c24d782c
commit 730155cf68
6 changed files with 59 additions and 4 deletions

View file

@ -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 += \

12
headers/ios/notch.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef NOTCH_H
#define NOTCH_H
#include <QObject>
class Notch : public QObject{
Q_OBJECT
public:
Notch();
};
#endif

View file

@ -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

View file

@ -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

17
sources/ios/notch.mm Normal file
View file

@ -0,0 +1,17 @@
#include <UIKit/UIKit.h>
#include <UIKit/UIApplication.h>
#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];
}

View file

@ -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) )