diff --git a/graphics/icons/ok.png b/graphics/icons/ok.png
new file mode 100644
index 0000000..e24854f
Binary files /dev/null and b/graphics/icons/ok.png differ
diff --git a/qml/ProfilesDialog.qml b/qml/ProfilesDialog.qml
index bcd6124..2cef0ea 100644
--- a/qml/ProfilesDialog.qml
+++ b/qml/ProfilesDialog.qml
@@ -18,7 +18,7 @@
import QtQuick 2.9
import QtMultimedia 5.8
import QtQuick.Window 2.2
-import QtQuick.Controls 2.2
+import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import com.itsblue.speedclimbingstopwatch 1.0
@@ -44,7 +44,6 @@ Popup {
}
background: Item {
-
RectangularGlow {
id: backgroundEffect
glowRadius: 7
@@ -64,7 +63,6 @@ Popup {
}
}
-
StackView {
id: profiles_stack
property int text_pixelSize: headlineUnderline.width * 0.08
@@ -75,9 +73,9 @@ Popup {
top: topContainerItm.bottom
left: parent.left
leftMargin: ( parent.width - headlineUnderline.width ) / 2
- //topMargin: headlineUnderline.anchors.topMargin * 1.2
+ topMargin: headlineUnderline.anchors.topMargin * 1.2
bottom: parent.bottom
- bottomMargin: topContainerItm.height
+ bottomMargin: topContainerItm.height * 0.3
}
Behavior on opacity {
@@ -88,7 +86,6 @@ Popup {
profiles_stack.init()
}
-
Connections {
target: root
onOpened: {
@@ -136,8 +133,8 @@ Popup {
profileList.loadData()
}
- anchors.fill: parent
- anchors.topMargin: topContainerItm.height * 0.1
+ //anchors.fill: parent
+ //anchors.topMargin: topContainerItm.height * 0.1
loadData: function () {
status = 905
@@ -217,6 +214,7 @@ Popup {
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
+ rightMargin: 7
}
height: parent.height * 0.6
@@ -390,6 +388,9 @@ Popup {
signal opened()
+ anchors.margins: 10
+
+ clip: true
onOpened: {
loadData()
@@ -474,20 +475,28 @@ Popup {
}
/*-----Custom animations-----*/
+ property int animationDuration: 200
pushEnter: Transition {
NumberAnimation {
property: "opacity"
from: 0
to: 1
- duration: 300
+ duration: profiles_stack.animationDuration
easing.type: Easing.InOutQuad
}
- NumberAnimation {
+ /*NumberAnimation {
property: "x"
from: width * 0.1
to: 0
duration: 300
+ }*/
+
+ NumberAnimation {
+ property: "scale"
+ from: 1.1
+ to: 1
+ duration: profiles_stack.animationDuration
}
}
pushExit: Transition {
@@ -495,15 +504,22 @@ Popup {
property: "opacity"
from: 1
to: 0
- duration: 300
+ duration: profiles_stack.animationDuration
easing.type: Easing.InOutQuad
}
- NumberAnimation {
+ /*NumberAnimation {
property: "x"
to: -width * 0.1
from: 0
duration: 300
+ }*/
+
+ NumberAnimation {
+ property: "scale"
+ from: 1
+ to: 0.9
+ duration: profiles_stack.animationDuration
}
}
@@ -512,14 +528,22 @@ Popup {
property: "opacity"
from: 1
to: 0
- duration: 300
+ duration: profiles_stack.animationDuration
easing.type: Easing.InOutQuad
}
- NumberAnimation {
+
+ /*NumberAnimation {
property: "x"
to: width * 0.1
from: 0
duration: 300
+ }*/
+
+ NumberAnimation {
+ property: "scale"
+ from: 1
+ to: 1.1
+ duration: profiles_stack.animationDuration
}
}
popEnter: Transition {
@@ -527,14 +551,22 @@ Popup {
property: "opacity"
from: 0
to: 1
- duration: 300
+ duration: profiles_stack.animationDuration
easing.type: Easing.InOutQuad
}
- NumberAnimation {
+
+ /*NumberAnimation {
property: "x"
from: -width * 0.1
to: 0
duration: 300
+ }*/
+
+ NumberAnimation {
+ property: "scale"
+ from: 0.9
+ to: 1
+ duration: profiles_stack.animationDuration
}
}
}
@@ -661,15 +693,15 @@ Popup {
}
height: topContainerItm.height * 0.8
- width:height
+ width: height
- opacity: root.opacity < 1 ? root.opacity : profiles_stack.currentItem.secondButt !== "none" ? 1:root.opacity
+ opacity: root.opacity < 1 ? root.opacity : ["ok", "add"].indexOf(profiles_stack.currentItem.secondButt) >= 0 ? 1:0
- glowOpacity: root.opacity < 1 ? Math.pow( root.opacity, 100 ) : Math.pow( root.opacity, 100 )
+ glowOpacity: opacity < 1 ? Math.pow( opacity, 100 ) : Math.pow( opacity, 100 )
backgroundColor: appTheme.style.buttonColor
- image: "qrc:/graphics/icons/ok_black.png"
+ image: appTheme.style.confirmIcon
imageScale: profiles_stack.currentItem.secondButt === "ok" ? 1:0
Label {
diff --git a/qml/components/RemoteDataListView.qml b/qml/components/RemoteDataListView.qml
index e184bab..b750739 100644
--- a/qml/components/RemoteDataListView.qml
+++ b/qml/components/RemoteDataListView.qml
@@ -11,6 +11,9 @@ Item {
property int status: -1
+ property alias contentY: listView.contentY
+ property alias model: listView.model
+
signal refresh()
Component.onCompleted: {
@@ -27,6 +30,10 @@ Item {
boundsBehavior: Flickable.DragOverBounds
boundsMovement: Flickable.StopAtBounds
+ anchors.margins: 1
+ anchors.rightMargin: 14
+ clip: true
+
//enabled: status === 200 || status === 902
//opacity: enabled ? 1:0
diff --git a/shared.qrc b/shared.qrc
index a5e6cc5..c430b9e 100644
--- a/shared.qrc
+++ b/shared.qrc
@@ -26,5 +26,6 @@
graphics/icons/buzzer.png
graphics/icons/startpad.png
graphics/icons/user_black.png
+ graphics/icons/ok.png
diff --git a/sources/apptheme.cpp b/sources/apptheme.cpp
index 74e7ddd..799f9d4 100644
--- a/sources/apptheme.cpp
+++ b/sources/apptheme.cpp
@@ -35,7 +35,8 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
{"buzzerIcon", "qrc:/graphics/icons/buzzer.png"},
{"startpadIcon", "qrc:/graphics/icons/startpad.png"},
{"baseStationIcon", "qrc:/graphics/icons/BaseStation.png"},
- {"profilesIcon", "qrc:/graphics/icons/user.png"}
+ {"profilesIcon", "qrc:/graphics/icons/user.png"},
+ {"confirmIcon", "qrc:/graphics/icons/ok.png"}
};
this->darkTheme = tmpDarkTheme;
@@ -72,7 +73,8 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
{"buzzerIcon", "qrc:/graphics/icons/buzzer_black.png"},
{"startpadIcon", "qrc:/graphics/icons/startpad_black.png"},
{"baseStationIcon", "qrc:/graphics/icons/BaseStation_black.png"},
- {"profilesIcon", "qrc:/graphics/icons/user_black.png"}
+ {"profilesIcon", "qrc:/graphics/icons/user_black.png"},
+ {"confirmIcon", "qrc:/graphics/icons/ok_black.png"}
};
this->lightTheme = tmpLightTheme;