on xenial help sign in
Merge pull request #424 from capsia37/remove-blur

Greeter feedback and improvements

commite1dbf76905c5d16b933600d3ce442a1e4fbfdcf3 authorAlfred E. Neumayer <dev.beidl@gmail.com> dateTue 1 Feb 2022, 10:12 (5 years ago) parent441abf29cb4627
4 files changed+25−51
qml/Greeter/CoverPage.qml+18−40 qml/Greeter/GreeterView.qml+4−8 qml/Greeter/PinPrompt.qml+1−1 tests/qmltests/Greeter/tst_GreeterView.qml+2−2
qml/Greeter/CoverPage.qml+18−40
@@ -29,22 +29,17 @@ 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
3536
36− property alias showInfographic: infographicsLoader.active
37+ property bool showInfographic: false
3738 property real infographicsLeftMargin: 0
3839 property real infographicsTopMargin: 0
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,48 +99,17 @@ 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
140− Loader {
141− id: infographicsLoader
142− objectName: "infographicsLoader"
143− sourceComponent:Infographics {
144− id: infographics
145− objectName: "infographics"
146− model: root.infographicModel
147− clip: true // clip large data bubbles
148− }
111+ Item {
112+ id: infographicsArea
149113
150114 anchors {
151115 leftMargin: root.infographicsLeftMargin
@@ -159,6 +123,20 @@ Showable {
159123 }
160124 }
161125
126+ Loader {
127+ id: infographicsLoader
128+ objectName: "infographicsLoader"
129+ active: root.showInfographic && infographicsArea.width > units.gu(32)
130+ anchors.fill: infographicsArea
131+
132+ sourceComponent:Infographics {
133+ id: infographics
134+ objectName: "infographics"
135+ model: root.infographicModel
136+ clip: true // clip large data bubbles
137+ }
138+ }
139+
162140 Label {
163141 id: swipeHint
164142 objectName: "swipeHint"
qml/Greeter/GreeterView.qml+4−8
@@ -132,18 +132,13 @@ 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
146− showInfographic: root.usageMode != "phone" && isLandscape && !delayedLockscreen.visible
141+ showInfographic: isLandscape && root.usageMode != "phone" && (root.usageMode != "tablet" || root.multiUser) && !delayedLockscreen.visible
147142 infographicModel: root.infographicModel
148143
149144 shown: false
@@ -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()
@@ -359,7 +355,7 @@ FocusScope {
359355 backgroundSourceSize: root.backgroundSourceSize
360356 infographicModel: root.infographicModel
361357
362− showInfographic: !root.multiUser && (!isLandscape || root.usageMode == "phone")
358+ showInfographic: !root.multiUser && root.usageMode != "desktop"
363359
364360 onShowProgressChanged: {
365361 if (showProgress === 0) {
qml/Greeter/PinPrompt.qml+1−1
@@ -166,7 +166,7 @@ FocusScope {
166166 // the user to be able to edit the field (simply because it would look
167167 // weird if we allowed that). But until we have such a disabled mode,
168168 // we'll fake it by covering the real text field with a label.
169− FadingLabel {
169+ Label {
170170 id: fakeLabel
171171 anchors.verticalCenter: extraIcons ? extraIcons.verticalCenter : undefined
172172 anchors.left: extraIcons ? extraIcons.left : undefined
tests/qmltests/Greeter/tst_GreeterView.qml+2−2
@@ -1295,8 +1295,8 @@ StyledItem {
12951295 multiUser: false,
12961296 usageMode: "tablet",
12971297 orientation: Qt.LandscapeOrientation,
1298− coverPage: false,
1299− lockscreen: true
1298+ coverPage: true,
1299+ lockscreen: false
13001300 },
13011301 {
13021302 tag: "tablet-landscape-multiuser",