summaryrefslogtreecommitdiff
path: root/Course/Detail/Classic/Content/Main/TabContents
diff options
context:
space:
mode:
authorErik Prabowo Kamal <erik@darapsa.org>2025-12-12 18:27:50 +0800
committerErik Prabowo Kamal <erik@darapsa.org>2025-12-12 18:27:50 +0800
commite8f2d82e994973a274ec3a72cbb568baffb91ffc (patch)
treed38d8cfdb29f4081b7e96bd12a1c939895f0a88d /Course/Detail/Classic/Content/Main/TabContents
parent93b25dfa97494184493e02b75766e57bc6fe79bb (diff)
Reimplement Qt5 ColorOverlay using Qt6 MultiEffect
https://stackoverflow.com/questions/70809206/color-overlay-an-image-in-qml-qt6#77060406 Even though the answer is not checked, but the Qt6.8 works, and after following the suggestion in its comment about brightness. The MultiEffect needs to be put outside of the Image when they're on a Button. Having MultiEffect as the Image layer's effect only works when it's not on a Button.
Diffstat (limited to 'Course/Detail/Classic/Content/Main/TabContents')
-rw-r--r--Course/Detail/Classic/Content/Main/TabContents/Instructor/ListInlineItem.ui.qml13
1 files changed, 8 insertions, 5 deletions
diff --git a/Course/Detail/Classic/Content/Main/TabContents/Instructor/ListInlineItem.ui.qml b/Course/Detail/Classic/Content/Main/TabContents/Instructor/ListInlineItem.ui.qml
index 0851fd7..9eb36dc 100644
--- a/Course/Detail/Classic/Content/Main/TabContents/Instructor/ListInlineItem.ui.qml
+++ b/Course/Detail/Classic/Content/Main/TabContents/Instructor/ListInlineItem.ui.qml
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-import Qt5Compat.GraphicalEffects
+import QtQuick.Effects
RowLayout {
@@ -25,10 +25,13 @@ RowLayout {
Layout.minimumHeight: 12
Layout.minimumWidth: 12
- ColorOverlay {
- anchors.fill: inlineItemIcon
- source: inlineItemIcon
- color: "#fd7e14"
+ layer {
+ enabled:true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: "#fd7e14"
+ }
}
}
}