Commit 4cb4b32d authored by Sebastian Gottfried's avatar Sebastian Gottfried
Browse files

Score Screen: Resurrect Learning Progress Legend

Without it the learning progress chart is quite difficult to make sense
of. Its code got deleted accidentally removed during the KF5 port.
parent 92441518
......@@ -431,9 +431,24 @@ FocusScope {
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
Charts.LegendItem {
id: accuracyLegend
anchors.verticalCenter: parent.verticalCenter
opacity: tabGroup.currentTab === learningProgressTab? 1: 0
Behavior on opacity {
NumberAnimation {duration: 150}
}
}
Charts.LegendItem {
id: charactersPerMinuteLegend
anchors.verticalCenter: parent.verticalCenter
opacity: tabGroup.currentTab === learningProgressTab? 1: 0
Behavior on opacity {
NumberAnimation {duration: 150}
}
}
}
TabView {
......@@ -464,6 +479,15 @@ FocusScope {
onElemExited: {
learningProgressPointTooltip.close()
}
Component.onCompleted: {
accuracyLegend.dimension = learningProgressChart.accuracy
charactersPerMinuteLegend.dimension = learningProgressChart.charactersPerMinute
}
Component.onDestruction: {
accuracyLegend.dimension = 0
charactersPerMinuteLegend.dimension = 0
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment