summaryrefslogtreecommitdiff
path: root/Student
diff options
context:
space:
mode:
authorErik Prabowo Kamal <erik@darapsa.org>2025-12-12 22:03:27 +0800
committerErik Prabowo Kamal <erik@darapsa.org>2025-12-12 22:03:27 +0800
commitd71942a538dd9fd9e335cd32639e78eb9aad90e1 (patch)
treeb10e734c67d09da6c1f105d9fd925be50dfbbddb /Student
parentcd1e0f2af47b2be460e45b750788809eb252193a (diff)
Reimplement Qt5 OpacityMask using Qt6 MultiEffect
Remaining ones. See 93b25dfa97494184493e02b75766e57bc6fe79bb https://darapsa.org/qeduport.git/commit/?id=93b25dfa97494184493e02b75766e57bc6fe79bb
Diffstat (limited to 'Student')
-rw-r--r--Student/Dashboard/CourseListItem.ui.qml40
1 files changed, 22 insertions, 18 deletions
diff --git a/Student/Dashboard/CourseListItem.ui.qml b/Student/Dashboard/CourseListItem.ui.qml
index ee5e657..cc2b04e 100644
--- a/Student/Dashboard/CourseListItem.ui.qml
+++ b/Student/Dashboard/CourseListItem.ui.qml
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-import Qt5Compat.GraphicalEffects
+import QtQuick.Effects
import Bootstrap
RowLayout {
@@ -12,29 +12,33 @@ RowLayout {
property alias courseListActionButton: courseListActionButton
spacing: 16
- Rectangle {
- id: courseThumbnail
- radius: 8
- Layout.preferredHeight: 72
- Layout.preferredWidth: 100
- Layout.minimumHeight: 72
- Layout.minimumWidth: 100
- Image {
- id: courseThumb
- source: "https://eduport.webestica.com/assets/images/courses/4by3/08.jpg"
- sourceSize: Qt.size(parent.width, parent.height)
- visible: false
+ Image {
+ id: courseThumb
+ source: "https://eduport.webestica.com/assets/images/courses/4by3/08.jpg"
+ sourceSize {
+ width: 100
+ height: 75
+ }
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ maskEnabled: true
+ maskSource: maskRectangle
+ }
}
- OpacityMask{
- anchors.fill: courseThumbnail
- source: courseThumb
- maskSource: courseThumbnail
+ Rectangle {
+ id: maskRectangle
+ width: courseThumb.sourceSize.width
+ height: courseThumb.sourceSize.height
+ radius: 8
+ layer.enabled: true
+ visible: false
}
}
ColumnLayout{
id: courseProgressInfo
spacing: 0
- width: parent.width - image.width - spacing
+ width: parent.width - courseThumb.width - spacing
Label{
id: courseTitle