[Lock Screen] Add option to hide clock when idle
ClosedPublic

Authored by broulik on Oct 23 2019, 7:33 PM.

Details

Summary

This allows to use it for a slideshow or something.

Test Plan


Option is on by default as before.
Clock hides in unison with the rest of the UI when unchecked.

Question is what about the mouse cursor? I think it should just always hide when idle (no config option) but there was a Qt bug where MouseArea wouldn't apply the cursorShape which was since fixed: https://bugreports.qt.io/browse/QTBUG-41045
So we could resurrect D13207 now but without hacks :) I would do this separately from this patch

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.
broulik created this revision.Oct 23 2019, 7:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 23 2019, 7:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Oct 23 2019, 7:33 PM
broulik edited the test plan for this revision. (Show Details)

This should make a lot of people happy. :)

Is there a way to suppress these settings when you're using a theme that doesn't make the clock and media controls optional?

lookandfeel/contents/lockscreen/config.qml
5–6

Make this a FormLayout since it now has multiple rows of items in it

Is there a way to suppress these settings when you're using a theme that doesn't make the clock and media controls optional?

That's the trick! The config comes *from the theme* (similar to how plasmoids do it), so only our theme will have those check boxes.

lookandfeel/contents/lockscreen/config.qml
5–6

Can't, really, as it has to be aligned wit the non QML bits and other UI elements out of the control of this item (see formAlignment comment)
(I also didn't bother tbh)

ngraham accepted this revision.Oct 23 2019, 8:27 PM

Oh nice! Shipit! Works great.

This revision is now accepted and ready to land.Oct 23 2019, 8:27 PM
davidedmundson added inline comments.
lookandfeel/contents/components/WallpaperFader.qml
145–149

Why are we changing this line?

lookandfeel/contents/lockscreen/config.qml
21

One thing Thomas always used to say was that if you have a checkbox it should be obvious what the opposite action is.

This currently sounds like if it's off, the clock will randomly start flashing like a 90's html <blink> tag.

broulik added inline comments.Oct 24 2019, 9:17 AM
lookandfeel/contents/components/WallpaperFader.qml
145–149

The clock shadow effectively renders the clock (shader effect with source hidden), so it has to be hidden.

lookandfeel/contents/lockscreen/config.qml
21

Can I have a <marquee> clock?
"Show when idle"? (Open to non-jargon suggestions)

mart added a subscriber: mart.Oct 28 2019, 11:08 AM

Instead of explicitly talking about clockwhat about a "Only show wallpaper when idle?"

mart added a comment.Nov 4 2019, 11:14 AM

clock "always show" is fine too tough

In D24893#558451, @mart wrote:

clock "always show" is fine too tough

Given that the setting will be off by default, its opposite state is clear enough I'd say. It's not the best string ever, but maybe we should start with this and massage it later or else this will probably be stuck in limbo forever...

This revision was automatically updated to reflect the committed changes.
In D24893#558451, @mart wrote:

clock "always show" is fine too tough

Given that the setting will be off by default, its opposite state is clear enough I'd say. It's not the best string ever, but maybe we should start with this and massage it later or else this will probably be stuck in limbo forever...

Does it make sense to have the option off by default, i.e. hiding the clock on idle by default?
I'd expect expect more users wanting to see the clock than users being annoyed by it (with the majority probably not caring either way), tbh. The slideshow is a very valid usecase for hiding it, but do we expect more users to have a slidehsow on their lock screen than users liking to always have a clock there?

Why not changing it to "Hide after X seconds of inactivity" and having it off by default?

Does it make sense to have the option off by default, i.e. hiding the clock on idle by default?

"Given that the setting will be off by default," is not true. By default the clock is shown, so nothing changes here, also given a static image is also our default.