[sddm-theme] Enlarge user avatar in focus
ClosedPublic

Authored by rooty on Feb 26 2019, 9:18 PM.

Details

Summary

This patch makes the user avatar that is selected (in focus) larger than the other unselected/deselected avatars surrounding it (provided there is more than one user).

Test Plan

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rooty created this revision.Feb 26 2019, 9:18 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 26 2019, 9:18 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
rooty requested review of this revision.Feb 26 2019, 9:18 PM
rooty edited the test plan for this revision. (Show Details)Feb 26 2019, 9:21 PM
rooty added reviewers: VDG, ngraham.
rooty edited the summary of this revision. (Show Details)
filipf added a subscriber: filipf.Feb 26 2019, 9:24 PM

As this is meant to be a replacement for opacity: isCurrent ? 1.0 : 0.5 I would suggest to remove it in this patch.

rooty added a comment.Feb 26 2019, 9:26 PM

As this is meant to be a replacement for opacity: isCurrent ? 1.0 : 0.5 I would suggest to remove it in this patch.

Are the circles supposed to be this dark though?

As this is meant to be a replacement for opacity: isCurrent ? 1.0 : 0.5 I would suggest to remove it in this patch.

Are the circles supposed to be this dark though?

We can tweak the circle color based on containsMouse, but opacity has to go (T9658#170319)

ngraham requested changes to this revision.Feb 26 2019, 10:02 PM

Perfect functionality! Now we need some more bling. :) I'd like for the size to animate as well.

A sane way to do this might be with a ScaleAnimator (https://doc.qt.io/qt-5/qml-qtquick-scaleanimator.html), and then do a tiny bit of refactoring to adjust the scale rather than changing faceSize.

This revision now requires changes to proceed.Feb 26 2019, 10:02 PM
rooty added a comment.EditedFeb 26 2019, 10:45 PM

Perfect functionality! Now we need some more bling. :) I'd like for the size to animate as well.

A sane way to do this might be with a ScaleAnimator (https://doc.qt.io/qt-5/qml-qtquick-scaleanimator.html), and then do a tiny bit of refactoring to adjust the scale rather than changing faceSize.

But wouldn't that involve arbitrary multiplication as opposed to relying on standardized units?

rooty added a comment.EditedFeb 26 2019, 10:55 PM

Also, if I use the scale effect, they don't seem to anchor as well as without it

Hmm, that's a shame. Well, regardless of implementation, I'd like to see some form of animation when the size changes. :)

rooty added a comment.Feb 27 2019, 7:26 PM

Hmm, that's a shame. Well, regardless of implementation, I'd like to see some form of animation when the size changes. :)

But it looks very smooth already. It's choppy in sddm-greeter but on the actual login screen it looks pretty good (more to the point - it looks very much the same as the transition from the user list screen to the prompt screen).

I also think that if we're going to opt for an animation effect, I'd like to do it in another patch :D

Heh, I'm sure some old SDDM (maybe even LightDM) theme did that. There was a whole Carousel system.

If you do animate, generally I've found that animating width won't do what you want, it'll cause the text to re-lay out and that looks weird.
Using Item.scale with a correct transform origin looks smooth, but obviously you lose some resolution in the text.

rooty added a comment.Feb 27 2019, 8:03 PM

Heh, I'm sure some old SDDM (maybe even LightDM) theme did that. There was a whole Carousel system.

I'm not sold on this idea :D I'm just worried it'll come out tacky

Heh, I'm sure some old SDDM (maybe even LightDM) theme did that. There was a whole Carousel system.

I'm not sold on this idea :D I'm just worried it'll come out tacky

I would agree, if there is no visual work using effects to ease the transitions between states, then it looks pretty unrefined. Dave, is there anything that would help here?

Heh, I'm sure some old SDDM (maybe even LightDM) theme did that. There was a whole Carousel system.

Our old SDDM theme did that as well, right?

rooty added a comment.Mar 1 2019, 12:31 PM

Sure, but I'd like to use the bling in another patch :D
It seems to transition fine, it doesn't just "pop" into a larger size

But I'm afraid I'm going to have to rebase this too because of D19433

rooty added a comment.EditedMar 3 2019, 12:24 AM

Heh, I'm sure some old SDDM (maybe even LightDM) theme did that. There was a whole Carousel system.

Our old SDDM theme did that as well, right?

This seems to be how they did it

source: visible ? "user-identity" : undefined
visible: (face.status == Image.Error || face.status == Image.Null)

Which isn't all that different from how this diff does it.
It still looks fairly animated to me :D

rooty updated this revision to Diff 53028.Mar 3 2019, 12:47 AM

Rebase; add property animation

rooty updated this revision to Diff 53030.Mar 3 2019, 2:19 AM

Prevent user avatar in focus from becoming blurred

rooty added a comment.Mar 3 2019, 2:26 AM

P.S. Should we use "live: true" or just delete the line? Because it's true by default, but this makes it clear that it shouldn't be live: false

rooty edited the test plan for this revision. (Show Details)Mar 3 2019, 2:49 AM
ngraham accepted this revision.Mar 3 2019, 2:39 PM

Perfect. Shipit!

FWIW I think being explicit is better than implicit when there's any possible chance of confusion or misunderstanding.

This revision is now accepted and ready to land.Mar 3 2019, 2:39 PM
This revision was automatically updated to reflect the committed changes.