finished up the layout of the profile and results view

This commit is contained in:
Dorian Zedler 2019-05-31 19:06:04 +02:00
parent 085e184d99
commit a3f0f13ff3
5 changed files with 64 additions and 22 deletions

BIN
graphics/icons/ok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

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

View file

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

View file

@ -26,5 +26,6 @@
<file>graphics/icons/buzzer.png</file>
<file>graphics/icons/startpad.png</file>
<file>graphics/icons/user_black.png</file>
<file>graphics/icons/ok.png</file>
</qresource>
</RCC>

View file

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