Internal makeover #35
4 changed files with 36 additions and 19 deletions
|
@ -168,7 +168,7 @@ Popup {
|
||||||
|
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
font.pixelSize: headlineUnderline.width * 0.1
|
font.pixelSize: headlineUnderline.width * 0.1
|
||||||
minimumPixelSize: 0
|
minimumPixelSize: 1
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
@ -244,7 +244,7 @@ Popup {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
switch(profilesStack.currentItem.secondButt){
|
switch(profilesStack.currentItem.secondButt){
|
||||||
case "add":
|
case "add":
|
||||||
profilesStack.push(addProfileComp)
|
profilesStack.createAthlete()
|
||||||
break
|
break
|
||||||
case "ok":
|
case "ok":
|
||||||
//speedBackend.createAthlete(fullNameTf.text, userNameTf.text)
|
//speedBackend.createAthlete(fullNameTf.text, userNameTf.text)
|
||||||
|
|
|
@ -53,22 +53,23 @@ StackView {
|
||||||
profilesStack.push(resComp)
|
profilesStack.push(resComp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createAthlete() {
|
||||||
|
var createAthleteComp = addProfileComp.createObject(null, {})
|
||||||
|
profilesStack.push(createAthleteComp)
|
||||||
|
}
|
||||||
|
|
||||||
/*-----List of all profiles-----*/
|
/*-----List of all profiles-----*/
|
||||||
Component {
|
Component {
|
||||||
id: profileListComp
|
id: profileListComp
|
||||||
|
|
||||||
ProfileListPage {
|
ProfileListPage {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----Option to add a profile-----*/
|
/*-----Option to add a profile-----*/
|
||||||
Component {
|
Component {
|
||||||
id: addProfileComp
|
id: addProfileComp
|
||||||
|
|
||||||
AddProfilePage {
|
AddProfilePage {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Result View ---
|
// --- Result View ---
|
||||||
|
|
|
@ -57,8 +57,7 @@ RemoteDataListView {
|
||||||
backgroundRect.radius: 0
|
backgroundRect.radius: 0
|
||||||
|
|
||||||
function getDateText(){
|
function getDateText(){
|
||||||
var date = new Date(listData[index]["timestamp"]*1000).toLocaleString(Qt.locale(), "dddd, dd.MMM HH:mm")
|
return new Date(listData[index]["timestamp"]*1000).toLocaleString(Qt.locale(), "dddd, dd.MMM HH:mm")
|
||||||
return date
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
35
qml/main.qml
35
qml/main.qml
|
@ -144,7 +144,7 @@ Window {
|
||||||
|
|
||||||
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
||||||
|
|
||||||
minimumPixelSize: 0
|
minimumPixelSize: 1
|
||||||
|
|
||||||
Behavior on text {
|
Behavior on text {
|
||||||
FadeAnimation{
|
FadeAnimation{
|
||||||
|
@ -194,7 +194,7 @@ Window {
|
||||||
|
|
||||||
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
font.pixelSize: root.landscape() ? parent.width * 0.15 : parent.height * 0.4
|
||||||
|
|
||||||
minimumPixelSize: 0
|
minimumPixelSize: 1
|
||||||
|
|
||||||
Behavior on text {
|
Behavior on text {
|
||||||
enabled: root.state !== "RUNNING"
|
enabled: root.state !== "RUNNING"
|
||||||
|
@ -605,7 +605,7 @@ Window {
|
||||||
|
|
||||||
enabled: height > 0
|
enabled: height > 0
|
||||||
|
|
||||||
height: speedBackend.baseStationState === "connected" ? root.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7:0
|
state: speedBackend.baseStationState === "connected" ? "visible":"hidden"
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -616,15 +616,32 @@ Window {
|
||||||
|
|
||||||
backgroundColor: parent.pressed ? appTheme.style.buttonPressedColor:appTheme.style.buttonColor
|
backgroundColor: parent.pressed ? appTheme.style.buttonPressedColor:appTheme.style.buttonColor
|
||||||
|
|
||||||
Behavior on height {
|
states: [
|
||||||
NumberAnimation {
|
State {
|
||||||
duration: 200
|
name: "hidden"
|
||||||
|
PropertyChanges {
|
||||||
|
target: profilesButt
|
||||||
|
height: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "visible"
|
||||||
|
PropertyChanges {
|
||||||
|
target: profilesButt
|
||||||
|
height: root.landscape() ? menu_container.width * 0.7:menu_container.height * 0.7
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
properties: "height"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------
|
/*----------------------
|
||||||
|
|
Reference in a new issue