summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Gottfried <sebastiangottfried@web.de>2015-06-09 15:46:06 (GMT)
committerSebastian Gottfried <sebastiangottfried@web.de>2015-06-09 15:46:06 (GMT)
commit2c15ae1696737683f40b800400ab9374ca58e4a7 (patch)
tree50aa20f8e31aa92169075e99057547188b1a7ad3
parenta5000ea6af2f0a8abd67410688a8eea33c52aecd (diff)
Qt5: Blur Background Of Lesson Locked Notice
It makes the element more readable.
-rw-r--r--src/qml/LessonLockedNotice.qml16
-rw-r--r--src/qml/LessonSelectorBase.qml9
2 files changed, 21 insertions, 4 deletions
diff --git a/src/qml/LessonLockedNotice.qml b/src/qml/LessonLockedNotice.qml
index 3e9110c..7bf65dc 100644
--- a/src/qml/LessonLockedNotice.qml
+++ b/src/qml/LessonLockedNotice.qml
@@ -30,15 +30,31 @@ Item {
width: content.width + 40
height: content.height + 40
+ property alias blurSource: effectSource.sourceItem
+
SystemPalette {
id: palette
colorGroup: SystemPalette.Active
}
+ ShaderEffectSource {
+ id: effectSource
+ anchors.fill: parent
+ hideSource: false
+ sourceRect: Qt.rect(root.x, root.y, root.width, root.height)
+ }
+
+ FastBlur {
+ anchors.fill: parent
+ source: effectSource
+ radius: 25
+ }
+
Rectangle {
id: background
anchors.fill: parent
color: palette.base
+ opacity: 0.3
radius: 15
}
diff --git a/src/qml/LessonSelectorBase.qml b/src/qml/LessonSelectorBase.qml
index c87fdee..0cfe5f9 100644
--- a/src/qml/LessonSelectorBase.qml
+++ b/src/qml/LessonSelectorBase.qml
@@ -55,11 +55,12 @@ Item {
Layout.fillHeight: true
lesson: selectedLesson
+ }
- LessonLockedNotice {
- anchors.centerIn: parent
- opacity: selectedLessonLocked? 1: 0
- }
+ LessonLockedNotice {
+ anchors.centerIn: lessonPreview
+ blurSource: lessonPreview
+ opacity: selectedLessonLocked? 1: 0
}
Item {