styling improvements

This commit is contained in:
Dorian Zedler 2019-07-05 14:06:09 +02:00
parent 095c6356af
commit 5971fe11b3

View file

@ -1,5 +1,6 @@
import QtQuick 2.10
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.1
ListView {
@ -306,7 +307,7 @@ ListView {
columns: app.landscape() ? 2:0
rows: app.landscape() ? 0:2
spacing: app.landscape() ? width * 0.01:0
spacing: app.landscape() ? height * 0.4:0
anchors.fill: parent
anchors.margins: matchRect.radius * 0.5
@ -315,50 +316,62 @@ ListView {
// for the two athletes
model: 2
delegate: Row {
delegate: RowLayout {
height: app.landscape() ? parent.height:parent.height / 2
width: app.landscape() ? parent.width / 2 : parent.width
height: app.landscape() ? parent.height:parent.height / 2 - parent.spacing
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 {
Layout.preferredHeight: parent.height
//Layout.preferredWidth: parent.width * 0.1
height: parent.height
width: parent.width * ( 0.1)
verticalAlignment: Text.AlignVCenter
font.pixelSize: height * 0.6
font.pixelSize: height * 0.7
fontSizeMode: Text.Fit
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 {
Layout.preferredHeight: parent.height
height: parent.height
width: parent.width * 0.5
verticalAlignment: Text.AlignVCenter
horizontalAlignment: app.landscape() ? Text.AlignLeft : Text.AlignLeft
font.pixelSize: app.landscape() ? height * 0.35 : height * 0.5
horizontalAlignment: Text.AlignHCenter
//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
elide: "ElideRight"
Layout.fillWidth: true
color: matchItm.winnerIndex === index ? "green":"black"
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['firstname'] + " " + matchItm.thisMatchData[index]['lastname'] :"-"
}
Label {
Layout.preferredHeight: parent.height
//Layout.preferredWidth: parent.width * 0.2
height: parent.height
width: parent.width * (app.landscape() ? 0.2 : 0.2)
verticalAlignment: Text.AlignVCenter
font.pixelSize: height * 0.6
fontSizeMode: Text.Fit
minimumPixelSize: 1
font.pixelSize: app.landscape() ? height * 0.35 : height * 0.5
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 {