summaryrefslogtreecommitdiff
path: root/Authentication
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 /Authentication
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 'Authentication')
-rw-r--r--Authentication/SignIn.ui.qml34
-rw-r--r--Authentication/SignUp.ui.qml50
2 files changed, 37 insertions, 47 deletions
diff --git a/Authentication/SignIn.ui.qml b/Authentication/SignIn.ui.qml
index 1e71e2b..d35eb39 100644
--- a/Authentication/SignIn.ui.qml
+++ b/Authentication/SignIn.ui.qml
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-import Qt5Compat.GraphicalEffects
+import QtQuick.Effects
import Bootstrap
import Eduport
import "../TextField" as TxtFld
@@ -87,15 +87,13 @@ Flickable {
20
}
- ColorOverlay {
- color:
- Eduport
- .bsSecondary
- source:
- parent
- anchors
- .fill:
- parent
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: Eduport.bsSecondary
+ }
}
}
@@ -156,15 +154,13 @@ Flickable {
20
}
- ColorOverlay {
- color:
- Eduport
- .bsSecondary
- source:
- parent
- anchors
- .fill:
- parent
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: Eduport.bsSecondary
+ }
}
}
diff --git a/Authentication/SignUp.ui.qml b/Authentication/SignUp.ui.qml
index dfdfda9..c7365c8 100644
--- a/Authentication/SignUp.ui.qml
+++ b/Authentication/SignUp.ui.qml
@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-import Qt5Compat.GraphicalEffects
+import QtQuick.Effects
import Bootstrap
import Eduport
import "../TextField" as TxtFld
@@ -89,15 +89,13 @@ Flickable {
20
}
- ColorOverlay {
- color:
- Eduport
- .bsSecondary
- source:
- parent
- anchors
- .fill:
- parent
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: Eduport.bsSecondary
+ }
}
}
@@ -158,15 +156,13 @@ Flickable {
20
}
- ColorOverlay {
- color:
- Eduport
- .bsSecondary
- source:
- parent
- anchors
- .fill:
- parent
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: Eduport.bsSecondary
+ }
}
}
@@ -231,15 +227,13 @@ Flickable {
20
}
- ColorOverlay {
- color:
- Eduport
- .bsSecondary
- source:
- parent
- anchors
- .fill:
- parent
+ layer {
+ enabled: true
+ effect: MultiEffect {
+ brightness: 1.0
+ colorization: 1.0
+ colorizationColor: Eduport.bsSecondary
+ }
}
}