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:

This allows the user to choose between automatically determined font size
(the default, and the current behavior), and completely manual font settings.
The UI refactor and layout code changes necessary for this feature also
happily fix a few bugs along the way.
BUG: 413394
BUG: 421548
BUG: 395468
FIXED-IN: 5.26
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.
This is a common snippet of code in applets. It prevents applet from
re-expanding again when user clicks on the compact representation when
the applet is already expanded and located on a desktop containment.
See also: 79bcefdd35
FIXED-IN: 5.24.7 5.25.4 5.26
dateTimeChanged is called every second. This in turn checks if the date
has changed. If so we call setupLabels which updates the clock.
The date label used to use main.currentTime which is a value set in the
binding of the timeLabel's text property. The order of this being
updated vs running this code is undefined.
Bug 1: We compare an ever so slightly different date source to the one
used in the date text label.
Bug 2: We are not necessarily updating the date label with the most
updated time.
Overall we can't mix declarative and imperative design patterns. This
patch commits to being imperative and introduces a function to get the
current time so that the date label and time label will always get the
most up to date value even if they update from different trigers.
BUG: 452554
FIXED-IN: 5.24.5
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.
Unlike when the clock is in a panel, there is plenty of space when it is
on the desktop. This means that we can safely let the date string word
wrap rather than shrink.
BUG: 450632
FIXED-IN: 5.24.3
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
don't set layout size hints from the contents size. this will cause
binding loops. use the implicit size instead.
This solves an issue visible especially on wayland (different roundtrip of timing of resizes in x11 seems to mask this problem) where the clock tooltip
sometimes gets stuck in an infinite resize loop freezing the whole plasma shell
BUG:422072
cd68df165a
added a setting to force the date to be at the same line as the time.
Add another option to that setting to force the date to be below the
time.
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 warning happens because the Digital Clock is using PC2 labels,
which set the pointSize internally. However in this usage of them, we
don't use the pointSize and instead set the pixelSize to make the label
always match the height of a size helper item. This results in both
pointSize and pixelSize being defined. This is an ambiguous situation,
so Qt helpfully ignores pointSize in favor of pixelSize and prints a
warning for us.
Because what we're doing here is intentional, let's explicitly unset
pointSize ourselves so we don't make Qt do it for us. This removes the
noisy warning message that is printed at every plasmashell startup.
Ultimately we need to port these labels to PC3, but that is quite
challenging due to the complicated text sizing logic.
- Make the list adpatable instead of a fixed height. Now the list
resizes with the window.
- Improve the placehoder placement
- Rework the bottom spacing reserved for the checkbox and the note
- Add again the overlay close button as it doesn't interfere anymore
- Workaround Qt bug to hide horizontal scrollbar
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 positioning here was funky as if it was trying to to do something
clever, but instead all it did was cause the text to overlap with the
first list item entry with certain combinations of font size and window
size. Instead let's just do the typical thing.