styling improvements
This commit is contained in:
parent
095c6356af
commit
5971fe11b3
1 changed files with 29 additions and 16 deletions
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.4
|
import QtQuick.Controls 2.4
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls.Material 2.1
|
import QtQuick.Controls.Material 2.1
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
@ -306,7 +307,7 @@ ListView {
|
||||||
columns: app.landscape() ? 2:0
|
columns: app.landscape() ? 2:0
|
||||||
rows: app.landscape() ? 0:2
|
rows: app.landscape() ? 0:2
|
||||||
|
|
||||||
spacing: app.landscape() ? width * 0.01:0
|
spacing: app.landscape() ? height * 0.4:0
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: matchRect.radius * 0.5
|
anchors.margins: matchRect.radius * 0.5
|
||||||
|
@ -315,50 +316,62 @@ ListView {
|
||||||
// for the two athletes
|
// for the two athletes
|
||||||
model: 2
|
model: 2
|
||||||
|
|
||||||
delegate: Row {
|
delegate: RowLayout {
|
||||||
|
|
||||||
height: app.landscape() ? parent.height:parent.height / 2
|
height: app.landscape() ? parent.height:parent.height / 2 - parent.spacing
|
||||||
width: app.landscape() ? parent.width / 2 : parent.width
|
width: app.landscape() ? parent.width / 2 - parent.spacing : parent.width
|
||||||
|
|
||||||
spacing: app.landscape() ? width * 0.1:height * 0.05
|
spacing: app.landscape() ? height * 0.1:height * 0.1
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
//Layout.preferredWidth: parent.width * 0.1
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: parent.width * ( 0.1)
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
font.pixelSize: height * 0.6
|
font.pixelSize: height * 0.7
|
||||||
fontSizeMode: Text.Fit
|
fontSizeMode: Text.Fit
|
||||||
minimumPixelSize: 1
|
minimumPixelSize: 1
|
||||||
|
|
||||||
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['result_rank0']: ""
|
Layout.alignment: Layout.Left
|
||||||
|
|
||||||
|
text: matchItm.thisMatchData[index] !== undefined ? (parseInt(matchItm.thisMatchData[index]['result_rank0']) < 10 ?matchItm.thisMatchData[index]['result_rank0'] + " ":matchItm.thisMatchData[index]['result_rank0']): ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: parent.width * 0.5
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: app.landscape() ? Text.AlignLeft : Text.AlignLeft
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.pixelSize: app.landscape() ? height * 0.35 : height * 0.5
|
//horizontalAlignment: app.landscape() ? Text.AlignLeft : Text.AlignLeft
|
||||||
|
font.pixelSize: app.landscape() ? height * 0.4 : height * 0.6
|
||||||
|
minimumPixelSize: app.landscape() ? height * 0.35 : height * 0.5
|
||||||
|
fontSizeMode: Text.Fit
|
||||||
font.bold: matchItm.winnerIndex === index
|
font.bold: matchItm.winnerIndex === index
|
||||||
elide: "ElideRight"
|
elide: "ElideRight"
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
color: matchItm.winnerIndex === index ? "green":"black"
|
color: matchItm.winnerIndex === index ? "green":"black"
|
||||||
|
|
||||||
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['firstname'] + " " + matchItm.thisMatchData[index]['lastname'] :"-"
|
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['firstname'] + " " + matchItm.thisMatchData[index]['lastname'] :"-"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
//Layout.preferredWidth: parent.width * 0.2
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: parent.width * (app.landscape() ? 0.2 : 0.2)
|
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
font.pixelSize: height * 0.6
|
font.pixelSize: app.landscape() ? height * 0.35 : height * 0.5
|
||||||
fontSizeMode: Text.Fit
|
|
||||||
minimumPixelSize: 1
|
|
||||||
|
|
||||||
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['result'+matchItm.thisRound]: ""
|
Layout.alignment: Layout.Right
|
||||||
|
|
||||||
|
text: matchItm.thisMatchData[index] !== undefined ? ( parseFloat(matchItm.thisMatchData[index]['result'+matchItm.thisRound]) ? (parseFloat(matchItm.thisMatchData[index]['result'+matchItm.thisRound]).toFixed(2)) : matchItm.thisMatchData[index]['result'+matchItm.thisRound] ): "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Rectangle {
|
/*Rectangle {
|
||||||
|
|
Loading…
Reference in a new issue