Changeset View
Changeset View
Standalone View
Standalone View
src/qml/scorescreen/ScoreScreen.qml
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 26 | FocusScope { | |||
---|---|---|---|---|---|
102 | } | 102 | } | ||
103 | 103 | | |||
104 | KColorScheme { | 104 | KColorScheme { | ||
105 | id: colorScheme | 105 | id: colorScheme | ||
106 | colorGroup: KColorScheme.Active | 106 | colorGroup: KColorScheme.Active | ||
107 | colorSet: KColorScheme.View | 107 | colorSet: KColorScheme.View | ||
108 | } | 108 | } | ||
109 | 109 | | |||
110 | 110 | | |||
gottfried: See above. | |||||
111 | | ||||
112 | LearningProgressModel { | 111 | LearningProgressModel { | ||
113 | property bool filterByLesson: learningProgressFilterComboBox.currentIndex == 1 | 112 | property bool filterByLesson: learningProgressFilterComboBox.currentIndex == 1 | ||
114 | id: learningProgressModel | 113 | id: learningProgressModel | ||
115 | profile: screen.visible? screen.profile: null | 114 | profile: screen.visible? screen.profile: null | ||
116 | courseFilter: screen.visible? screen.course: null | 115 | courseFilter: screen.visible? screen.course: null | ||
117 | lessonFilter: screen.visible && filterByLesson? screen.lesson: null | 116 | lessonFilter: screen.visible && filterByLesson? screen.lesson: null | ||
118 | } | 117 | } | ||
119 | 118 | | |||
▲ Show 20 Lines • Show All 215 Lines • ▼ Show 20 Line(s) | 279 | RowLayout { | |||
335 | 334 | | |||
336 | Charts.LegendItem { | 335 | Charts.LegendItem { | ||
337 | id: accuracyLegend | 336 | id: accuracyLegend | ||
338 | textColor: colorScheme.normalText | 337 | textColor: colorScheme.normalText | ||
339 | Layout.alignment: Qt.AlignVCenter | 338 | Layout.alignment: Qt.AlignVCenter | ||
340 | opacity: tabGroup.currentItem === learningProgressTab? 1: 0 | 339 | opacity: tabGroup.currentItem === learningProgressTab? 1: 0 | ||
341 | Behavior on opacity { | 340 | Behavior on opacity { | ||
342 | NumberAnimation {duration: 150} | 341 | NumberAnimation {duration: 150} | ||
343 | } | 342 | } | ||
This change is not necessary. The legend followed to the color scheme before, too. gottfried: This change is not necessary. The legend followed to the color scheme before, too. | |||||
344 | } | 343 | } | ||
345 | Charts.LegendItem { | 344 | Charts.LegendItem { | ||
346 | id: charactersPerMinuteLegend | 345 | id: charactersPerMinuteLegend | ||
347 | textColor: colorScheme.normalText | 346 | textColor: colorScheme.normalText | ||
348 | Layout.alignment: Qt.AlignVCenter | 347 | Layout.alignment: Qt.AlignVCenter | ||
349 | opacity: tabGroup.currentItem === learningProgressTab? 1: 0 | 348 | opacity: tabGroup.currentItem === learningProgressTab? 1: 0 | ||
350 | Behavior on opacity { | 349 | Behavior on opacity { | ||
351 | NumberAnimation {duration: 150} | 350 | NumberAnimation {duration: 150} | ||
352 | } | 351 | } | ||
This change is not necessary. The legend followed to the color scheme before, too. gottfried: This change is not necessary. The legend followed to the color scheme before, too. | |||||
353 | } | 352 | } | ||
354 | } | 353 | } | ||
355 | 354 | | |||
356 | Item { | 355 | Item { | ||
357 | Layout.fillHeight: true | 356 | Layout.fillHeight: true | ||
358 | Layout.fillWidth: true | 357 | Layout.fillWidth: true | ||
359 | 358 | | |||
360 | 359 | | |||
361 | StackLayout { | 360 | StackLayout { | ||
362 | anchors.fill: parent | 361 | anchors.fill: parent | ||
363 | id: tabGroup | 362 | id: tabGroup | ||
364 | currentIndex: chartTypeComboBox.currentIndex | 363 | currentIndex: chartTypeComboBox.currentIndex | ||
365 | property Item currentItem: currentIndex != -1? children[currentIndex]: null | 364 | property Item currentItem: currentIndex != -1? children[currentIndex]: null | ||
366 | 365 | | |||
367 | 366 | | |||
368 | LearningProgressChart { | 367 | LearningProgressChart { | ||
369 | id: learningProgressTab | 368 | id: learningProgressTab | ||
370 | property string title: i18n("Progress") | 369 | property string title: i18n("Progress") | ||
371 | property string iconName: "office-chart-area" | 370 | property string iconName: "office-chart-area" | ||
372 | model: learningProgressModel | 371 | model: learningProgressModel | ||
373 | backgroundColor: colorScheme.normalBackground | 372 | backgroundColor: colorScheme.normalBackground | ||
373 | textColor: colorScheme.normalText | ||||
374 | 374 | | |||
375 | Component.onCompleted: { | 375 | Component.onCompleted: { | ||
376 | accuracyLegend.dimension = learningProgressTab.accuracy | 376 | accuracyLegend.dimension = learningProgressTab.accuracy | ||
377 | charactersPerMinuteLegend.dimension = learningProgressTab.charactersPerMinute | 377 | charactersPerMinuteLegend.dimension = learningProgressTab.charactersPerMinute | ||
378 | } | 378 | } | ||
gottfried: Please use `KColorScheme` instead. | |||||
379 | Component.onDestruction: { | 379 | Component.onDestruction: { | ||
380 | accuracyLegend.dimension = null | 380 | accuracyLegend.dimension = null | ||
381 | charactersPerMinuteLegend.dimension = null | 381 | charactersPerMinuteLegend.dimension = null | ||
382 | } | 382 | } | ||
383 | } | 383 | } | ||
384 | 384 | | |||
385 | Charts.BarChart{ | 385 | Charts.BarChart{ | ||
386 | id: errorsTab | 386 | id: errorsTab | ||
Show All 33 Lines |
See above.