on xenial help sign in
Replace blur on greeter with darkening

Darken the background instead of blurring the login area to prevent flashing rectangle when unlocking

commit9fdc9f8a294e20fcef6f0a5f8c9ffe45343c8f39 authorCapsia <cmsuser3754@zoho.eu> dateSun 23 Jan 2022, 22:32 (5 years ago) parent441abf2
2 files changed+3−36
qml/Greeter/CoverPage.qml+1−30 qml/Greeter/GreeterView.qml+2−6
qml/Greeter/CoverPage.qml+1−30
@@ -29,6 +29,7 @@ Showable {
2929 property alias background: greeterBackground.source
3030 property alias backgroundSourceSize: greeterBackground.sourceSize
3131 property alias hasCustomBackground: backgroundShade.visible
32+ property alias backgroundShadeOpacity: backgroundShade.opacity
3233 property real panelHeight
3334 property var infographicModel
3435 property bool draggable: true
@@ -39,12 +40,6 @@ Showable {
3940 property real infographicsRightMargin: 0
4041 property real infographicsBottomMargin: 0
4142
42− property alias blurAreaHeight: loginBoxEffects.height
43− property alias blurAreaWidth: loginBoxEffects.width
44− property alias blurAreaX: loginBoxEffects.x
45− property alias blurAreaY: loginBoxEffects.y
46− property alias blurRadius: loginBoxBlur.radius
47−
4843 readonly property real showProgress: MathUtils.clamp((width - Math.abs(x + launcherOffset)) / width, 0, 1)
4944
5045 signal tease()
@@ -104,36 +99,12 @@ Showable {
10499 }
105100 }
106101
107− Rectangle {
108− id: loginBoxEffects
109− color: "transparent"
110− }
111−
112− ShaderEffectSource {
113− id: effectSource
114−
115− sourceItem: greeterBackground
116− anchors.centerIn: loginBoxEffects
117− width: loginBoxEffects.width
118− height: loginBoxEffects.height
119− sourceRect: Qt.rect(x,y, width, height)
120− }
121−
122− FastBlur {
123− id: loginBoxBlur
124− visible: !draggable
125− anchors.fill: effectSource
126− source: effectSource
127− transparentBorder: true
128− }
129−
130102 // Darkens wallpaper so that we can read text on it and see infographic
131103 Rectangle {
132104 id: backgroundShade
133105 objectName: "backgroundShade"
134106 anchors.fill: parent
135107 color: "black"
136− opacity: 0.4
137108 visible: false
138109 }
139110
qml/Greeter/GreeterView.qml+2−6
@@ -132,16 +132,11 @@ FocusScope {
132132 draggable: false
133133 state: "LoginList"
134134
135− blurAreaHeight: loginList.highlightedHeight + units.gu(4.5)
136− blurAreaWidth: loginList.width + units.gu(3)
137− blurAreaX: loginList.x - units.gu(1.5)
138− blurAreaY: loginList.boxVerticalOffset + loginList.y - units.gu(3)
139− blurRadius: root.usageMode != "phone" && root.usageMode != "tablet" ? 64 : 0
140−
141135 background: root.background
142136 backgroundSourceSize: root.backgroundSourceSize
143137 panelHeight: root.panelHeight
144138 hasCustomBackground: root.hasCustomBackground
139+ backgroundShadeOpacity: 0.6
145140
146141 showInfographic: root.usageMode != "phone" && isLandscape && !delayedLockscreen.visible
147142 infographicModel: root.infographicModel
@@ -352,6 +347,7 @@ FocusScope {
352347 width: parent.width
353348 background: root.background
354349 hasCustomBackground: root.hasCustomBackground
350+ backgroundShadeOpacity: 0.4
355351 panelHeight: root.panelHeight
356352 draggable: !root.waiting
357353 onTease: root.tease()