diff --git a/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/BusyIndicator.qml b/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/BusyIndicator.qml index 14494e0..ffeaf10 100644 --- a/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/BusyIndicator.qml +++ b/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/BusyIndicator.qml @@ -23,7 +23,7 @@ import QtQuick.Controls 2.0 T.BusyIndicator { id: control - property var image: "qrc:/images/SpeedHold.png" + property var image: "qrc:/images/SpeedHoldBlack.png" implicitWidth: leftPadding + rightPadding implicitHeight: topPadding + bottomPadding diff --git a/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/TimerColumn.qml b/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/TimerColumn.qml index c7fefe4..cf3c0ec 100644 --- a/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/TimerColumn.qml +++ b/ScStwStyling/resources/qml/lib/de/itsblue/ScStw/Styling/Components/TimerColumn.qml @@ -28,26 +28,14 @@ Column { property var fontName property bool showSecLabel: false property bool showTimerLetter: true - - opacity: backend.scStwClient.state === ScStwClient.CONNECTED ? 1:0 + property double textScale: 1 spacing: 0 Repeater { id: timerRep - property var clearedTimers: removeDisabledTimers(control.timers) - - function removeDisabledTimers(timers) { - var ret = [] - for(var i = 0; i < timers.length; i++) { - if(timers[i]["state"] !== ScStwTimer.DISABLED) - ret.push(timers[i]) - } - return ret - } - - model: clearedTimers.length + model: control.timers.length delegate: Item { id: timerDel @@ -55,17 +43,16 @@ Column { width: parent.width height: control.height / timerRep.model - Label { - id: laneNameLa + Text { + id: timerLetterLa - visible: control.showTimerLetter + enabled: control.showTimerLetter && text !== "" anchors { left: parent.left + leftMargin: parent.width * 0.03 } - leftPadding: parent.width * 0.03 - width: parent.width * 0.15 height: parent.height * 0.5 @@ -74,45 +61,54 @@ Column { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft - text: timerRep.clearedTimers[index]["letter"] + opacity: enabled ? 1:0 + + text: control.timers[index]["letter"] color: control.colors.accent font.pixelSize: height font.styleName: control.fontName + + Behavior on opacity { + NumberAnimation { + duration: 200 + } + } } - Label { + Text { id: timerTextLa anchors.centerIn: parent - anchors.horizontalCenterOffset: laneNameLa.text !== "" ? parent.width * 0.06:0 + anchors.horizontalCenterOffset: timerLetterLa.enabled ? parent.width * 0.06:0 anchors.verticalCenterOffset: -(parent.height * 0.04 * reactTimeLa.opacity) width: parent.width * 0.8 height: parent.height * 0.8 - elide: "ElideRight" - color: ([ScStwTimer.WON].indexOf(timerRep.clearedTimers[index]["state"]) >= 0 ? control.colors.success : - [ScStwTimer.FAILED,ScStwTimer.LOST].indexOf(timerRep.clearedTimers[index]["state"]) >= 0 ? control.colors.error: + color: ([ScStwTimer.WON].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.success : + [ScStwTimer.FAILED,ScStwTimer.LOST].indexOf(control.timers[index]["state"]) >= 0 ? control.colors.error: control.colors.text) - text: timerRep.clearedTimers[index]["text"] + enabled: control.timers[index]["state"] !== ScStwTimer.DISABLED + + text: control.timers[index]["text"] fontSizeMode: Text.Fit verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - font.pixelSize: height + font.pixelSize: height * 0.5 font.styleName: control.fontName minimumPixelSize: 1 } - Label { + Text { id: reactTimeLa - property int rtime: timerRep.clearedTimers[index]["reactionTime"] + property int rtime: control.timers[index]["reactionTime"] anchors { centerIn: parent @@ -126,7 +122,7 @@ Column { scale: enabled ? 1:0.9 opacity: enabled ? 1:0 - enabled: timerRep.clearedTimers[index]["state"] >= ScStwTimer.STARTING && rtime !== 0 + enabled: control.timers[index]["state"] >= ScStwTimer.STARTING && rtime !== 0 fontSizeMode: Text.Fit @@ -137,7 +133,7 @@ Column { color: control.colors.text - font.pixelSize: timerTextLa.font.pixelSize * 0.5 + font.pixelSize: timerTextLa.font.pixelSize * control.textScale font.styleName: control.fontName minimumPixelSize: 1