diff --git a/README.md b/README.md index 8fa125a..5cdf7e0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ $ make > [SingleApplication](src/thirdparty/SingleApplication/README.md) Keep only one instance of your application active at a time -#### QML components +#### QML component library > TODO diff --git a/qml/ScreenAbout.qml b/qml/ScreenAbout.qml index 36db651..e7a1bb3 100644 --- a/qml/ScreenAbout.qml +++ b/qml/ScreenAbout.qml @@ -74,12 +74,12 @@ Loader { Column { anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: 2 + anchors.verticalCenterOffset: -2 Text { text: "QmlAppTemplate" color: Theme.colorText - font.pixelSize: 28 + font.pixelSize: Theme.fontSizeTitle } Text { color: Theme.colorSubText diff --git a/qml/ScreenDesktopComponents.qml b/qml/ScreenDesktopComponents.qml index ab48415..95e5431 100644 --- a/qml/ScreenDesktopComponents.qml +++ b/qml/ScreenDesktopComponents.qml @@ -311,7 +311,7 @@ Loader { Text { anchors.verticalCenter: parent.verticalCenter - text: "OS theme" + text: "OS theme is" font.pixelSize: Theme.fontSizeContent font.bold: true color: Theme.colorText @@ -336,12 +336,9 @@ Loader { //// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } @@ -586,6 +583,60 @@ Loader { } //// +/* + Row { + anchors.left: parent.left + anchors.right: parent.right + spacing: Theme.componentMargin + + Rectangle { // new effect + id: rectangle1 + + width: 64 + height: 64 + color: "red" + + layer.enabled: true + layer.effect: MultiEffect { + autoPaddingEnabled: false + + maskEnabled: true + maskInverted: false + maskThresholdMin: 0.5 + maskSpreadAtMin: 1.0 + maskSpreadAtMax: 0.0 + maskSource: ShaderEffectSource { + sourceItem: Rectangle { + height: rectangle1.height + width: rectangle1.width + radius: 64 + } + } + + blurEnabled: false + blur: 0.5 + } + } + + Rectangle { // old effect + id: rectangle2 + + width: 64 + height: 64 + color: "red" + + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Rectangle { + height: rectangle2.height + width: rectangle2.width + radius: 64 + } + } + } + } +*/ + //// Row { anchors.left: parent.left @@ -627,12 +678,9 @@ Loader { //////////////////////// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } @@ -682,12 +730,9 @@ Loader { //////////////////////// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } @@ -743,12 +788,9 @@ Loader { //////////////////////// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } @@ -778,12 +820,9 @@ Loader { //////////////////////// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } @@ -894,12 +933,9 @@ Loader { //////////////////////// - Rectangle { // separator - height: 2 - color: Theme.colorSeparator - anchors.left: parent.left + ListSeparator { + height: Theme.componentBorderWidth anchors.leftMargin: -24 - anchors.right: parent.right anchors.rightMargin: -24 } diff --git a/qml/popups/PopupChoice.qml b/qml/popups/PopupChoice.qml index 516ad0b..af66b78 100644 --- a/qml/popups/PopupChoice.qml +++ b/qml/popups/PopupChoice.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Effects import QtQuick.Controls import ThemeEngine @@ -10,9 +11,10 @@ Popup { y: singleColumn ? (appWindow.height - height) : ((appWindow.height / 2) - (height / 2)) - width: singleColumn ? appWindow.width : 640 + width: singleColumn ? appWindow.width : 720 height: columnContent.height + padding*2 + screenPaddingNavbar + screenPaddingBottom padding: Theme.componentMarginXL + margins: 0 dim: true modal: true @@ -24,6 +26,8 @@ Popup { //////////////////////////////////////////////////////////////////////////// + //enter: Transition { NumberAnimation { property: "opacity"; from: 0.333; to: 1.0; duration: 233; } } + background: Rectangle { color: Theme.colorBackground border.color: Theme.colorSeparator @@ -36,6 +40,13 @@ Popup { visible: singleColumn color: Theme.colorSeparator } + + layer.enabled: !singleColumn + layer.effect: MultiEffect { + autoPaddingEnabled: true + shadowEnabled: true + shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff" + } } //////////////////////////////////////////////////////////////////////////// @@ -76,7 +87,7 @@ Popup { width: parent.width spacing: Theme.componentMargin - property var btnSize: singleColumn ? width : ((width-spacing*2) / 3) + property int btnSize: singleColumn ? width : ((width-spacing*2) / 3) ButtonWireframe { width: parent.btnSize diff --git a/qml/popups/PopupMessage.qml b/qml/popups/PopupMessage.qml index b4d2d3e..f9bcd95 100644 --- a/qml/popups/PopupMessage.qml +++ b/qml/popups/PopupMessage.qml @@ -1,4 +1,5 @@ import QtQuick +import QtQuick.Effects import QtQuick.Controls import ThemeEngine @@ -10,7 +11,7 @@ Popup { y: singleColumn ? (appWindow.height - height) : ((appWindow.height / 2) - (height / 2)) - width: singleColumn ? appWindow.width : 640 + width: singleColumn ? appWindow.width : 720 height: columnContent.height + padding*2 + screenPaddingNavbar + screenPaddingBottom padding: Theme.componentMarginXL margins: 0 @@ -25,6 +26,8 @@ Popup { //////////////////////////////////////////////////////////////////////////// + //enter: Transition { NumberAnimation { property: "opacity"; from: 0.333; to: 1.0; duration: 233; } } + background: Rectangle { color: Theme.colorBackground border.color: Theme.colorSeparator @@ -37,6 +40,13 @@ Popup { visible: singleColumn color: Theme.colorSeparator } + + layer.enabled: !singleColumn + layer.effect: MultiEffect { + autoPaddingEnabled: true + shadowEnabled: true + shadowColor: ThemeEngine.isLight ? "#aa000000" : "#aaffffff" + } } //////////////////////////////////////////////////////////////////////////// diff --git a/src/thirdparty/AppUtils/AppUtils.pri b/src/thirdparty/AppUtils/AppUtils.pri index 44905c3..cd7aed6 100644 --- a/src/thirdparty/AppUtils/AppUtils.pri +++ b/src/thirdparty/AppUtils/AppUtils.pri @@ -1,4 +1,8 @@ +# Optional stuff (for iOS) +#CONFIG += UTILS_NOTIFICATIONS_ENABLED +#CONFIG += UTILS_WIFI_ENABLED + # Generic utils SOURCES += $${PWD}/utils_app.cpp \ $${PWD}/utils_bits.cpp \ @@ -55,6 +59,8 @@ win32 { # Android OS utils android { + DEFINES += UTILS_NOTIFICATIONS_ENABLED UTILS_WIFI_ENABLED + versionAtLeast(QT_VERSION, 6.0) { QT += core-private @@ -70,19 +76,23 @@ android { # iOS utils ios { - QT += quick - LIBS += -framework UIKit SOURCES += $${PWD}/utils_os_ios.mm HEADERS += $${PWD}/utils_os_ios.h # iOS notifications (optional) - #LIBS += -framework UserNotifications - #SOURCES += $${PWD}/utils_os_ios_notif.mm - #HEADERS += $${PWD}/utils_os_ios_notif.h + UTILS_NOTIFICATIONS_ENABLED { + DEFINES += UTILS_NOTIFICATIONS_ENABLED + LIBS += -framework UserNotifications + SOURCES += $${PWD}/utils_os_ios_notif.mm + HEADERS += $${PWD}/utils_os_ios_notif.h + } # iOS WiFi SSID (optional) - #LIBS += -framework SystemConfiguration - #SOURCES += $${PWD}/utils_os_ios_wifi.mm - #HEADERS += $${PWD}/utils_os_ios_wifi.h + UTILS_WIFI_ENABLED { + DEFINES += UTILS_WIFI_ENABLED + LIBS += -framework SystemConfiguration + SOURCES += $${PWD}/utils_os_ios_wifi.mm + HEADERS += $${PWD}/utils_os_ios_wifi.h + } } diff --git a/src/thirdparty/AppUtils/utils_wifi.cpp b/src/thirdparty/AppUtils/utils_wifi.cpp index 2210711..cda2586 100644 --- a/src/thirdparty/AppUtils/utils_wifi.cpp +++ b/src/thirdparty/AppUtils/utils_wifi.cpp @@ -24,7 +24,7 @@ #if defined(Q_OS_ANDROID) #include "utils_os_android.h" -#elif defined(Q_OS_IOS) +#elif defined(Q_OS_IOS) && defined(UTILS_WIFI_ENABLED) #include "utils_os_ios_wifi.h" #endif @@ -114,7 +114,7 @@ void UtilsWiFi::refreshWiFi_internal() #if defined(Q_OS_ANDROID) m_currentSSID = UtilsAndroid::getWifiSSID(); Q_EMIT wifiChanged(); -#elif defined(Q_OS_IOS) +#elif defined(Q_OS_IOS) && defined(UTILS_WIFI_ENABLED) m_currentSSID = UtilsIOS::getWifiSSID(); Q_EMIT wifiChanged(); #else