[applet/digital-clock] Show time zones in expanded representation too
ClosedPublic

Authored by ngraham on Fri, Mar 6, 4:29 PM.

Details

Summary

Right now time zones are only shown in the tooltip, which is annoying since the tooltip
times out aftew a few seconds, so it often closes before I can find the timezone I'm
looking for.

This patch adds a view for the current tomezones in the expanded representation, and
implements a mockup in https://bugs.kde.org/show_bug.cgi?id=395655 showing a proposal
for how to present this information.

The Expanded Representation is also ported to Layouts in order to make this task easier.

FEATURE: 395655
FIXED-IN: 5.19.0

Test Plan

Just calendar:

Calendar + events:

Calendar + time zones:

Calendar + events + time zones:

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.
ngraham created this revision.Fri, Mar 6, 4:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFri, Mar 6, 4:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Fri, Mar 6, 4:29 PM
apol added a subscriber: apol.Mon, Mar 9, 1:50 AM

Looks much better!

cblack accepted this revision.Thu, Mar 12, 7:25 PM
cblack added a subscriber: cblack.

Visually, this looks good.

The code also looks makes sense and looks good to me, albeit there's some minor style issues, mostly in how properties are grouped and ordered.

This revision is now accepted and ready to land.Thu, Mar 12, 7:25 PM
cblack added inline comments.Thu, Mar 12, 7:39 PM
applets/digital-clock/package/contents/ui/CalendarView.qml
432

This property's name doesn't imply it's a boolean

applets/digital-clock/package/contents/ui/main.qml
62

This variable is only used in the following statement, so I would move it into there. Would probably make it multiple lines to not hurt readability.

69

Style change: use arg() instead of string concatenation so it's easier to see what the end string will look like

80

Declaring a variable and then returning it immediately seems redundant.

apol added inline comments.Fri, Mar 13, 12:06 AM
applets/digital-clock/package/contents/ui/main.qml
69

I don't think that's fair. I wouldn't say arg makes it more readable.

@cblack all of those things are in the existing code; I just moved the section from one place to another. I'd prefer to do those refactorings in another commit.

ngraham updated this revision to Diff 77531.Fri, Mar 13, 4:50 AM
ngraham marked an inline comment as done.

Use better name for bool property

This revision was automatically updated to reflect the committed changes.