diff options
author | civilH <robinhoodsociety@protonmail.com> | 2023-08-29 17:12:31 +0700 |
---|---|---|
committer | civilH <robinhoodsociety@protonmail.com> | 2023-08-29 17:12:31 +0700 |
commit | 2b5bc7fab55682b2af724b37dbd1fb4e745f077a (patch) | |
tree | 728c5a95b40a512c539db76f5ac6eeff2b7ca5a0 /Student/Dashboard | |
parent | bf4bbd6ee6518c22c1c585f6b4db640ecd9195f0 (diff) |
add data list courses & make changes in progress
- the list of courses having more data
- the progress bar is more clear to recognize by user
Diffstat (limited to 'Student/Dashboard')
-rw-r--r-- | Student/Dashboard/CourseListItem.ui.qml | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/Student/Dashboard/CourseListItem.ui.qml b/Student/Dashboard/CourseListItem.ui.qml index 3a4d407..227d785 100644 --- a/Student/Dashboard/CourseListItem.ui.qml +++ b/Student/Dashboard/CourseListItem.ui.qml @@ -39,6 +39,8 @@ Item { ColumnLayout{ id: courseProgressInfo spacing: 0 + width: parent.width - image.width - spacing + Label{ id: courseTitle color: "#000000" @@ -48,19 +50,30 @@ Item { font.styleName: "Medium" Layout.fillWidth: true } - Label{ - id: courseProgressPercentage - color: "#000000" - text: "80%" - font.pointSize: 16 - font.family: "roboto" - font.styleName: "Medium" - horizontalAlignment: Text.AlignRight - Layout.fillWidth: true - } - ProgressBar { - id: courseProgressBar - value: 0.8 + + RowLayout { // So the Bar and % of value side by side + ProgressBar { + id: courseProgressBar + value: completedLectures / totalLectures * 100 + to: 100 + width: parent.width * 0.7 + height: 10 + background: Rectangle { + color: "#666666" // Background color of the ProgressBar + } + } + Label{ + id: courseProgressPercentage + // color: "#000000" + text: Math.round(completedLectures / totalLectures * 100) + "%" + color: "#666666" + // font.pixelSize: 14 + font.pointSize: 14 + font.family: "roboto" + font.styleName: "Medium" + // horizontalAlignment: Text.AlignRight + // Layout.fillWidth: true + } } } Button { @@ -70,6 +83,9 @@ Item { font.weight: Font.Medium font.family: "Roboto" font.pointSize: 14 + onClicked: { + // Implement resuming logic + } } } } |