Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/WallpaperFader.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 42 | NumberAnimation { | |||
---|---|---|---|---|---|
44 | property: "factor" | 44 | property: "factor" | ||
45 | duration: 1000 | 45 | duration: 1000 | ||
46 | easing.type: Easing.InOutQuad | 46 | easing.type: Easing.InOutQuad | ||
47 | } | 47 | } | ||
48 | } | 48 | } | ||
49 | FastBlur { | 49 | FastBlur { | ||
50 | id: wallpaperBlur | 50 | id: wallpaperBlur | ||
51 | anchors.fill: parent | 51 | anchors.fill: parent | ||
52 | radius: 100 * wallpaperFader.factor | 52 | radius: 50 * wallpaperFader.factor | ||
53 | } | 53 | } | ||
54 | ShaderEffect { | 54 | ShaderEffect { | ||
55 | id: wallpaperShader | 55 | id: wallpaperShader | ||
56 | anchors.fill: parent | 56 | anchors.fill: parent | ||
57 | supportsAtlasTextures: true | 57 | supportsAtlasTextures: true | ||
58 | property var source: ShaderEffectSource { | 58 | property var source: ShaderEffectSource { | ||
59 | sourceItem: wallpaperBlur | 59 | sourceItem: wallpaperBlur | ||
60 | live: true | 60 | live: true | ||
61 | hideSource: true | 61 | hideSource: true | ||
62 | textureMirroring: ShaderEffectSource.NoMirroring | 62 | textureMirroring: ShaderEffectSource.NoMirroring | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | readonly property real contrast: 0.45 * wallpaperFader.factor + (1 - wallpaperFader.factor) | 65 | readonly property real contrast: 0.65 * wallpaperFader.factor + (1 - wallpaperFader.factor) | ||
66 | readonly property real saturation: 1.7 * wallpaperFader.factor + (1 - wallpaperFader.factor) | 66 | readonly property real saturation: 1.6 * wallpaperFader.factor + (1 - wallpaperFader.factor) | ||
67 | readonly property real intensity: (wallpaperFader.lightBackground ? 1.7 : 0.45) * wallpaperFader.factor + (1 - wallpaperFader.factor) | 67 | readonly property real intensity: (wallpaperFader.lightBackground ? 1.7 : 0.6) * wallpaperFader.factor + (1 - wallpaperFader.factor) | ||
68 | 68 | | |||
69 | readonly property real transl: (1.0 - contrast) / 2.0; | 69 | readonly property real transl: (1.0 - contrast) / 2.0; | ||
70 | readonly property real rval: (1.0 - saturation) * 0.2126; | 70 | readonly property real rval: (1.0 - saturation) * 0.2126; | ||
71 | readonly property real gval: (1.0 - saturation) * 0.7152; | 71 | readonly property real gval: (1.0 - saturation) * 0.7152; | ||
72 | readonly property real bval: (1.0 - saturation) * 0.0722; | 72 | readonly property real bval: (1.0 - saturation) * 0.0722; | ||
73 | 73 | | |||
74 | property var colorMatrix: Qt.matrix4x4( | 74 | property var colorMatrix: Qt.matrix4x4( | ||
75 | contrast, 0, 0, 0.0, | 75 | contrast, 0, 0, 0.0, | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |