minor design fixes and improvenemts

This commit is contained in:
Dorian Zedler 2019-05-21 19:07:54 +02:00
parent 75b193e642
commit 085e184d99

View file

@ -84,14 +84,15 @@ Popup {
NumberAnimation {duration: 200}
}
Component.onCompleted: {
profiles_stack.init()
}
Connections {
target: root
onOpened: {
if(profiles_stack.depth > 0){
profiles_stack.clear()
}
profiles_stack.openAthletes()
profiles_stack.init()
}
}
@ -99,6 +100,15 @@ Popup {
currentItem.opened()
}
function init() {
if(profiles_stack.depth === 0){
profiles_stack.openAthletes()
}
else {
profiles_stack.currentItem.opened()
}
}
function openAthletes() {
var athsComp = profileListComp.createObject(null, {})
profiles_stack.push(athsComp)
@ -622,27 +632,22 @@ Popup {
anchors {
left: parent.left
leftMargin: -parent.width * 0.03
leftMargin: -height * 0.3
top:parent.top
topMargin: -parent.height * 0.03
topMargin: anchors.leftMargin
}
height: parent.height * 0.1
height: topContainerItm.height * 0.8
width: height
glowOpacity: Math.pow( root.opacity, 100 )
backgroundColor: appTheme.style.buttonColor
image: "qrc:/graphics/icons/back_black.png"
image: appTheme.style.backIcon
onClicked: profiles_stack.depth > 1 ? profiles_stack.pop():root.close()
Behavior on opacity {
NumberAnimation {
duration: 100
}
}
}
FancyButton {
@ -650,16 +655,17 @@ Popup {
anchors {
right: parent.right
rightMargin: -parent.width * 0.03
rightMargin: -height * 0.3
top:parent.top
topMargin: -parent.height * 0.03
topMargin: anchors.rightMargin
}
height: parent.height * 0.1
height: topContainerItm.height * 0.8
width:height
opacity: root.opacity < 1 ? root.opacity : profiles_stack.currentItem.secondButt !== "none" ? 1:0
opacity: root.opacity < 1 ? root.opacity : profiles_stack.currentItem.secondButt !== "none" ? 1:root.opacity
//glowOpacity: Math.pow( root.opacity, 100 )
glowOpacity: root.opacity < 1 ? Math.pow( root.opacity, 100 ) : Math.pow( root.opacity, 100 )
backgroundColor: appTheme.style.buttonColor
@ -678,7 +684,7 @@ Popup {
color: appTheme.style.textColor
text: "+"
font.pixelSize: parent.height
font.pixelSize: parent.height * 0.8
}
onClicked: {
@ -693,8 +699,9 @@ Popup {
}
Behavior on opacity {
enabled: root.opacity === 1
NumberAnimation {
duration: 100
duration: 200
}
}
}