The date can be changed using scrolling or the buttons provided. It does not animate the view though. With this MR I have tried to implement this. Though the goal here is not just animating the view. The user can now flick the view as well to change date. There is already https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1843 this MR that does all of this and more. But there was many controversial changes and the code was a mess. The way animation was being handled could be improved. This is a much more smaller version of that MR. I have tried to make as less changes as possible to the MonthView since it is already very messy. All I have done is creating a new component and wrapped the views in that component. The code changes not as much in the MonthView as it seems in the diff. Here's what I am talking about:

Plasmoid.self is a relatively recent thing, but it saves code from hacks
such as this property just for the sake of putting an onChanged handler
for it.
We use a checkmark icon for the notifications applet since having no
unread notifications is considered a good thing. In this busy modern
world, having no scheduled events on a particular day can be considered
in the same way, so let's use a checkmark icon here too.
Sad that we still need to do this because the patch to fix that bug
never got merged because it failed to adjust a failing test, and has
bitrotted in the two years since then.
BUG: 448387
FIXED-IN: 5.24.1
When the agenda view is visible, the scrollview had neither
fillHeight: true nor a maximum height set. As a result, it would never
scroll. This commit fixes that by setting a maximum height.
BUG: 439147
FIXED-IN: 5.22.5
This uses the newly introduced API in plasma-framework to use a custom calendar
header in the applet header and moves the events and timezone information to the
left column and the calendar to the right column.
We ported units to use the PlasmaCore.Units singleton earlier; now it's
time to do the same thing for PlasmaCore.Theme.
There are no UI changes or regressions detected.
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`
The agenda view is only shown when at least one event source is active.
When going from 0 to 1 active sources the view wasn't updated correctly.
This was because the visibility of rightColumn was bound to the
visibility of its child, but since the visibility of the parent affects
the visibility of its childred (https://doc.qt.io/qt-5/qml-qtquick-item.html#visible-prop) that resulted in a broken binding.
Bind to the source property directly to avoid this
BUG: 431433
Qt 5.14 introduced new restoreMode mandatory property. Fix warnings like this one:
QML Binding: Not restoring previous value because restoreMode has not been set.
Right now we have a usability problem: the Digital Clock applet has two
ways to let you change the timezone displayed in the applet itself, but
has no easy link to the correct way to change the timezone systemwide. As
a result, users change the timezone in the clock and wonder why times are
wrong everywhere else throughout the OS.
This commit removes the feature of changing the timezone in just the
clock, and replaces it with an overhauled Time Zones page in the config
dialog and a new button in the popup that links you to the Date & Time
KCM where you can change the systemwide time zone in the correct way.
I anticipate that this may cause some grumbling from people who currently
use the "mouse wheel to cycle through timezones" behavior, but now that
all the timezones and their times are displayed prominently in the popup,
you can just click on the applet to show the popup instead of rolling the
mouse wheel over it to cycle through times; it's different, but no worse.
BUG: 428096
FIXED-IN: 5.21
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Because the content is manufactured from scratch, we need to set the
height manually, or else everything will get scrunched together.
BUG: 427281
FIXED-IN: 5.20
This begins the process of porting plasma-workspace to PlasmaComponents3. At
this point, only the relatively easy work is done. Every file not ported
now has been given the reason for still using PC2 in a comment on the import
line so you can see at a glance what the blocker is by running
`grep -r "org.kde.plasma.components 2.0"` in the repo.
Everything is tested and there are no breakages or functional regressions. In
the process, a few unused imports are removed.
Here are the remaining PC3 omissions blocking what's left from getting easily
ported:
- No Highlight
- No ListItem
- No PageStack
- No ContextMenu
- No QueryDialog
- No ModelContextMenu
- TabBar has no left and right tab states
- ToolButton has no built-in method to show a menu when clicked
We got some user complaints about the new Calendar pop-up, saying that
it used too much space, which honestly is a reasonable critique.
This MR tweaks the layout in the following ways:
- Reduce paddings from units.largeSpacing to units.smallSpacing
- Replace the huge custom date header with a standardized PlasmoidHeader
containing the current locale's standard long date and the pin button
- Move the events view from under the calendar into the column to the
right of the calendar, sharing space with the list of clocks
- Increase space efficiency of Events view by removing the per-event-type section headers
Hopefully this should address concerns with the 5.19 layout. I think it
does look much nicer, myself.
Summary:
I noticed that on the first time I bring up the calendar by clicking the clock on my Plasma panel, it always shows "No event for today". If I click another day on the calendar and then click back on today, it shows today's events fine. It should display it correctly the first time.
To fix this bug, we need to compare the date without time.
BUG: 395956
FIXED-IN: 5.19.0
Reviewers: ngraham, #plasma, vkrause
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28354
Summary:
The Pin buttons in the System Tray and Clock pop-ups are very small. This has
always felt slightly odd to me, and the recent change to add a defined header
area for the System Tray pop-up makes it even odder in my opinion, as the icon
is now much smaller than the area it visibly inhabits. This patch makes both icons
in both applets use the standard size with no local overrides. The clock pop-up's
pin button is ported to PC3 in the process.
Depends on D28228
Test Plan:
Before: {F8194101}
After: {F8194100}
Reviewers: #vdg, #plasma, ognarb, mart
Reviewed By: #vdg, #plasma, ognarb, mart
Subscribers: mart, ndavis, broulik, ognarb, plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D28211
Summary:
This patch allows you to switch the timezone by clicking on your desired one in the
applet's expanded representation. This is much simpler than the mouse-wheel-based UI and
does not need a config setting to turn it on or off.
Test Plan: {F8183863}
Reviewers: #vdg, #plasma, jriddell, cblack
Reviewed By: #vdg, #plasma, cblack
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T9222
Differential Revision: https://phabricator.kde.org/D28133
Summary:
Various people were complaining that the calendar was too squished after D27903. This
patch restores its size to be closer to the old version. As a consequence, the whole
expanded representation is quite large now, but there really is no other way.
Test Plan:
Before: {F8181551}
After: {F8181550}
Reviewers: #vdg, broulik, mart, cblack
Reviewed By: #vdg, cblack
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28104
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: {F8157434}
Calendar + events: {F8157435}
Calendar + time zones: {F8157436}
Calendar + events + time zones: {F8157437}
Reviewers: #vdg, #plasma, cblack
Reviewed By: #vdg, cblack
Subscribers: cblack, apol, plasma-devel
Tags: #plasma
Maniphest Tasks: T9222
Differential Revision: https://phabricator.kde.org/D27903
Summary:
System tray dialog/popup can be tiled. This should not be allowed, in this case expanded representaiton should have fixed size. When tiled, it is no longer possible to restore original size.
This also applies to other plasmoids.
BUG: 386551
FIXED-IN: 5.18.0
Test Plan:
1. Open any applet from system tray (for example Clipboard or hidden items)
2. Use shortcut to tile window (by default Meta + Left/Righ/...)
3. Applet will change size and tile at the borded of the screen
4. Expected:
a) before fix: allowed and not possible to restore size
b) after fix: not allowed or restores size on next open
Reviewers: #plasma_workspaces, #plasma, davidedmundson, broulik, ngraham
Reviewed By: ngraham
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26545
Also, when an appointment has no description, let the title use both lines of text,
and center them vertically if it doesn't need both lines.
The tooltip is only enabled if the title is actually elided, otherwise it could be bothersome to have.
BUG: 378970
FIXED-IN: 5.12.0
Differential Revision: https://phabricator.kde.org/D9641
Summary:
A user can "pin" the calendar so that it won't get closed on focus
change, but only when the clock is clicked again.
This persists across open/close operations, but currently doesn't
persist across Plasma restarts.
This patch loads the saved config value of the last pinned state.
Test Plan:
Opened calendar, set pin, closed it, reopened and it was still pinned
(which is the current state)
killed plasma, restarted plasma, was still pinned (new)
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8252