Skip to content

Commit

Permalink
New Force Style mode
Browse files Browse the repository at this point in the history
  • Loading branch information
realbardia committed Oct 6, 2024
1 parent 75e5016 commit 1d7101c
Show file tree
Hide file tree
Showing 40 changed files with 44 additions and 38 deletions.
1 change: 1 addition & 0 deletions MeikadeApp.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ QMAKE_TARGET_BUNDLE_PREFIX = com.meikade
QMAKE_BUNDLE = Meikade

DEFINES += DISABLE_SUBSCRIPTION
DEFINES += FORCE_IOSSTYLE

include(configurations/configurations.pri)
include(translations/translations.pri)
Expand Down
2 changes: 1 addition & 1 deletion configurations/android/android.pri
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ android {
$$PWD/gradle.properties
}

ANDROID_ABIS = armeabi-v7a arm64-v8a x86_64 x86
ANDROID_ABIS = arm64-v8a

android: include(/opt/develop/android/openssl/openssl.pri)
7 changes: 6 additions & 1 deletion cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ int main(int argc, char *argv[])
qputenv("QT_ANDROID_ENABLE_WORKAROUND_TO_DISABLE_PREDICTIVE_TEXT", "1");
qputenv("QT_LOGGING_RULES", "qt.qml.connections=false");

bool androidStyle;
bool androidStyle = false;
#ifdef Q_OS_ANDROID
#ifdef FORCE_IOSSTYLE
androidStyle = false;
QQuickStyle::setStyle("IOSStyle");
#else
androidStyle = true;
QQuickStyle::setStyle("Material");
#endif
#else
androidStyle = false;
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
Expand Down
2 changes: 1 addition & 1 deletion qml/TestDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Page {
text: "Configs Panel"
color: "#fff"
light: false
shadow: Devices.isAndroid
shadow: isAndroidStyle
}

HScrollBar {
Expand Down
2 changes: 1 addition & 1 deletion qml/auth/views/privates/ChangePasswordForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Page {
text: qsTr("Change Password") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion qml/auth/views/privates/ChangePasswordUsingCodeForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Page {
text: qsTr("Forget Password") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.left: parent.left
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Page {
text: qsTr("Change Password") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion qml/auth/views/privates/ForgetPasswordForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Page {
text: qsTr("Forget Password") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion qml/auth/views/privates/LoginForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Page {
text: qsTr("Authenticating") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle
visible: !introMode

HeaderBackButton {
Expand Down
2 changes: 1 addition & 1 deletion qml/auth/views/privates/SignupForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Page {
text: qsTr("Signup") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion qml/explore/views/privates/ExploreForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Item {
anchors.right: parent.right
anchors.top: parent.top
titleFontSize: 10 * Devices.fontDensity
shadow: Devices.isAndroid
shadow: isAndroidStyle
opacity: Devices.isIOS || Devices.isDesktop? 0.8 : 1
}

Expand Down
2 changes: 1 addition & 1 deletion qml/general/views/AboutView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Page {
anchors.right: parent.right
anchors.top: parent.top
color: "#222222"
shadow: Devices.isAndroid
shadow: isAndroidStyle
text: qsTr("About") + Translations.refresher

HeaderBackButton {
Expand Down
2 changes: 1 addition & 1 deletion qml/general/views/ChangelogsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Page {
text: qsTr("ChangeLogs") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/general/views/ContactView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ Page {
text: qsTr("Contact us") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/general/views/SettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Item {
anchors.left: parent.left
text: qsTr("Settings") + Translations.refresher
color: Colors.lightBackground
shadow: Devices.isAndroid
shadow: isAndroidStyle
light: Colors.darkMode

HeaderBackButton {
Expand Down
2 changes: 1 addition & 1 deletion qml/general/views/SyncView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Page {
text: qsTr("Sync") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/home/views/privates/HomeForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Item {
anchors.right: parent.right
anchors.top: parent.top
titleFontSize: 10 * Devices.fontDensity
shadow: Devices.isAndroid
shadow: isAndroidStyle
opacity: Devices.isIOS || Devices.isDesktop? 0.8 : 1
}

Expand Down
2 changes: 1 addition & 1 deletion qml/imports/components/DrawerFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Item {
Rectangle {
anchors.fill: parent
color: Colors.background
opacity: 0.5
opacity: Devices.isAndroid? 1 : 0.5
}

AsemanFlickable {
Expand Down
Binary file modified qml/imports/globals/translations/lang-en.qm
Binary file not shown.
Binary file modified qml/imports/globals/translations/lang-fa.qm
Binary file not shown.
2 changes: 1 addition & 1 deletion qml/imports/models/MyMeikadeModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ AsemanListModel {
res[res.length] = {
"title": qsTr("Privacy Policy") + Translations.refresher,
"icon": "mdi_information",
"link": "float:/web?link=http://meikade.com/privacy&title=" + qsTr("Privacy Policy"),
"link": "float:/web?link=https://meikade.com/privacy&title=" + qsTr("Privacy Policy"),
"underco": false
};

Expand Down
2 changes: 1 addition & 1 deletion qml/lists/views/FavoritedListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Item {
text: qsTr("Favoriteds") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/lists/views/FavoritedPoetsListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Item {
anchors.left: parent.left
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

ColumnLayout {
anchors.horizontalCenter: parent.horizontalCenter
Expand Down
4 changes: 2 additions & 2 deletions qml/lists/views/ListsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Item {
Rectangle {
anchors.fill: parent
color: selectMode? Colors.background : Colors.deepBackground
opacity: selectMode? 0.5 : 1
opacity: selectMode && !Devices.isAndroid? 0.5 : 1
}

ReloadItem {
Expand Down Expand Up @@ -325,7 +325,7 @@ Item {
anchors.left: parent.left
text: qsTr("Lists") + Translations.refresher
color: selectMode? "transparent" : Colors.headerColor
shadow: selectMode? false : Devices.isAndroid
shadow: selectMode? false : isAndroidStyle
light: (!selectMode || Colors.darkMode) && !Colors.lightHeader

HeaderBackButton {
Expand Down
2 changes: 1 addition & 1 deletion qml/messages/views/InboxView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Page {
text: qsTr("Inbox") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/notes/views/AddNoteView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Page {
text: qsTr("Edit Note") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/notes/views/NotesListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Item {
text: qsTr("Notes") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/notes/views/NotesPoetsListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Item {
text: qsTr("Notes") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/poems/views/MostReadedPoemsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Item {
text: qsTr("Most Recents") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/poet/views/ManageOfflinePoetsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Item {
text: qsTr("Edit Shelf") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/poet/views/PoetBooksView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Item {
anchors.left: parent.left
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

RowLayout {
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion qml/poet/views/PoetTypesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Item {
text: qsTr("Manage Shelf") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/poet/views/PoetsListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Item {
light: !Colors.lightHeader
text: qsTr("All Poets") + Translations.refresher
titleFontSize: 10 * Devices.fontDensity
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: headerBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/poet/views/TopPoetsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Item {
text: qsTr("Manage Shelf") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/publish/views/PublishView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ Page {
anchors.top: parent.top
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

Image {
anchors.centerIn: parent
Expand Down
2 changes: 1 addition & 1 deletion qml/randoms/views/HafizFaalView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Item {
text: qsTr("Hafiz Faal") + Translations.refresher
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

HeaderBackButton {
id: closeBtn
Expand Down
2 changes: 1 addition & 1 deletion qml/search/views/SearchView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
shadow: Devices.isAndroid
shadow: isAndroidStyle

Rectangle {
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion qml/volcano/PaymentsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Page {
anchors.right: parent.right
color: Colors.headerColor
light: !Colors.lightHeader
shadow: Devices.isAndroid
shadow: isAndroidStyle

ColumnLayout {
anchors.centerIn: parent
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/thirdparty.pri
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

!qtHaveModule(asemanqml): {
QT_ASEMAN_MODULES += core gui qml network widgets sql
ASEMAN_QML_MODULES += materialicons controls models viewport base network controls_beta sql
ASEMAN_QML_MODULES += materialicons controls models viewport base network controls_beta sql modern graphicaleffects

DEFINES += QASEMAN_STATIC
include(qtaseman/aseman.pri)
Expand Down

0 comments on commit 1d7101c

Please sign in to comment.