diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index bd61a81d..9b065160 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -4,6 +4,7 @@ @@ -39,6 +40,7 @@ + diff --git a/android/res/drawable/cwtch_logo.png b/android/res/drawable/cwtch_logo.png new file mode 100644 index 00000000..8f9e32ba Binary files /dev/null and b/android/res/drawable/cwtch_logo.png differ diff --git a/android/res/drawable/splash.xml b/android/res/drawable/splash.xml new file mode 100644 index 00000000..0599ae76 --- /dev/null +++ b/android/res/drawable/splash.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/android/res/values/apptheme.xml b/android/res/values/apptheme.xml new file mode 100644 index 00000000..adec2328 --- /dev/null +++ b/android/res/values/apptheme.xml @@ -0,0 +1,6 @@ + + + + diff --git a/qml.qrc b/qml.qrc index 99f13d05..b4097e8e 100644 --- a/qml.qrc +++ b/qml.qrc @@ -12,6 +12,7 @@ qml/panes/OverlayPane.qml qml/panes/PeerSettingsPane.qml qml/panes/SettingsPane.qml + qml/panes/SplashPane.qml qml/styles/CwtchComboBoxStyle.qml qml/styles/CwtchExpandingButton.qml qml/styles/CwtchTextAreaStyle.qml @@ -34,5 +35,7 @@ i18n/translation_en.qm i18n/translation_fr.qm i18n/translation_pt.qm + qml/images/cwtch_logo.png + qml/styles/CwtchProgress.qml diff --git a/qml/images/cwtch_logo.png b/qml/images/cwtch_logo.png new file mode 100644 index 00000000..8f9e32ba Binary files /dev/null and b/qml/images/cwtch_logo.png differ diff --git a/qml/main.qml b/qml/main.qml index 13075eb5..59374554 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -106,66 +106,88 @@ ApplicationWindow { } }*/ - RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR - /* anchors.left: ratio >= 0.92 ? parent.left : toolbar.right - anchors.top: ratio >= 0.92 ? toolbar.bottom : parent.top - anchors.right: parent.right - anchors.bottom: parent.bottom */ - anchors.fill: parent - spacing: 0 + StackLayout { + id: parentStack + currentIndex: 0 + anchors.fill: parent + + Rectangle { // Splash pane + color: "#FFFFFF" + //Layout.fillHeight: true + //Layout.minimumWidth: Layout.maximumWidth + //Layout.minimumHeight: parent.height + anchors.fill: parent + + visible: true + + SplashPane { + anchors.fill: parent + } + } - Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS - color: "#D2C0DD" - Layout.fillHeight: true - Layout.minimumWidth: Layout.maximumWidth - Layout.maximumWidth: theStack.pane == theStack.emptyPane ? parent.width : 450 - visible: (ratio <= 1.08 && windowItem.width >= 700) || theStack.pane == theStack.emptyPane + RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR + /* anchors.left: ratio >= 0.92 ? parent.left : toolbar.right + anchors.top: ratio >= 0.92 ? toolbar.bottom : parent.top + anchors.right: parent.right + anchors.bottom: parent.bottom */ + anchors.fill: parent + spacing: 0 - ContactList{ - anchors.fill: parent - } - } - Rectangle { // THE RIGHT PANE WHERE THE MESSAGES AND STUFF GO - color: "#EEEEFF" - Layout.fillWidth: true - Layout.fillHeight: true + Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS + color: "#D2C0DD" + Layout.fillHeight: true + Layout.minimumWidth: Layout.maximumWidth + Layout.maximumWidth: theStack.pane == theStack.emptyPane ? parent.width : 450 + visible: (ratio <= 1.08 && windowItem.width >= 700) || theStack.pane == theStack.emptyPane - StackLayout { - id: theStack - anchors.fill: parent - currentIndex: 0 + ContactList{ + anchors.fill: parent + } + } - property alias pane: theStack.currentIndex - readonly property int emptyPane: 0 - readonly property int messagePane: 1 - readonly property int settingsPane: 2 - readonly property int userProfilePane: 3 - readonly property int groupProfilePane: 4 - readonly property int addGroupPane: 5 - - property string title + Rectangle { // THE RIGHT PANE WHERE THE MESSAGES AND STUFF GO + color: "#EEEEFF" + Layout.fillWidth: true + Layout.fillHeight: true - Item { anchors.fill: parent } // empty + StackLayout { + id: theStack + anchors.fill: parent + currentIndex: 0 - OverlayPane { // messagePane - title: theStack.title - anchors.fill: parent - } + property alias pane: theStack.currentIndex + readonly property int emptyPane: 0 + readonly property int messagePane: 1 + readonly property int settingsPane: 2 + readonly property int userProfilePane: 3 + readonly property int groupProfilePane: 4 + readonly property int addGroupPane: 5 - SettingsPane{ anchors.fill: parent } + property string title - PeerSettingsPane { anchors.fill: parent } - GroupSettingsPane{ anchors.fill: parent } + Item { anchors.fill: parent } // empty - AddGroupPane { anchors.fill: parent } - } - } + OverlayPane { // messagePane + title: theStack.title + anchors.fill: parent + } + + SettingsPane{ anchors.fill: parent } + + PeerSettingsPane { anchors.fill: parent } + + GroupSettingsPane{ anchors.fill: parent } + + AddGroupPane { anchors.fill: parent } + } + } + } } PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; target: popup; property: "opacity"; to: 0; } @@ -207,4 +229,4 @@ ApplicationWindow { theStack.title = str } } -} \ No newline at end of file +} diff --git a/qml/panes/SplashPane.qml b/qml/panes/SplashPane.qml new file mode 100644 index 00000000..0a503411 --- /dev/null +++ b/qml/panes/SplashPane.qml @@ -0,0 +1,30 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.4 +import QtQuick.Controls.Material 2.0 +import QtQuick.Layouts 1.3 +import QtQuick.Window 2.11 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import "../styles" + +Item { + Image { + id: splashImage + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + source: "qrc:/qml/images/cwtch_logo.png" + } + + ProgressBar { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: splashImage.bottom + anchors.topMargin: 10 + + indeterminate: true + + style: ProgressBarStyle { + progress: CwtchProgress {} + } + } +} diff --git a/qml/styles/CwtchProgress.qml b/qml/styles/CwtchProgress.qml new file mode 100644 index 00000000..63fe59b7 --- /dev/null +++ b/qml/styles/CwtchProgress.qml @@ -0,0 +1,35 @@ +import QtQuick 2.7 +import QtQuick.Controls 2.4 +import QtQuick.Controls.Material 2.0 +import QtQuick.Layouts 1.3 +import QtQuick.Window 2.11 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 + + +Rectangle { + border.color: "#D2C0DD" + color: "red" + + // Indeterminate animation by animating alternating stripes: + Item { + anchors.fill: parent + anchors.margins: 1 + visible: control.indeterminate + clip: true + Row { + Repeater { + Rectangle { + color: index % 2 ? "#D2C0DD" : "#b29dbe" + width: 20 ; height: control.height + } + model: control.width / 20 + 2 + } + XAnimator on x { + from: 0 ; to: -40 + loops: Animation.Infinite + running: parentStack.currentIndex == 0 + } + } + } +} diff --git a/qml/widgets/MyProfile.qml b/qml/widgets/MyProfile.qml index f76124f9..9d80501e 100644 --- a/qml/widgets/MyProfile.qml +++ b/qml/widgets/MyProfile.qml @@ -229,6 +229,7 @@ ColumnLayout { lblNick.text = _nick onion = _onion image = _image + parentStack.currentIndex = 1 } onTorStatus: function(code, str) { @@ -236,4 +237,4 @@ ColumnLayout { rectTorStatus.message = str } } -} \ No newline at end of file +}