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
Sometimes, the filter in the timezone selector would only
show those items already selected.
Initialize the property 'showOnlyChecked' on the proxy model
so it doesn't depend on random initialization
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.
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`
a699acd3ff introduced a syntax error,
which prevented the time zone config dialog of the digital clock applet
from being shown:
"file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/
contents/ui/configTimeZones.qml:144:38: Expected token `:'"
I assume the intention was to only show the check box if there are
multiple timezones configured, so "visible" should be the forgotten
property.
After the rest of the UI changes made to the applet and the time zone
config page, I don't think users will be confused by the differences
between the timezone displayed in the clock, and the systemwide local
timezone anymore. Therefore, it should be safe enough to bring back the
wheely time feature.
BUG: 431977
This is the paradigm we use for highlighting the current/selected item
in various other contexts, and Kirigami.BasicListItem has built-in
facilities for it. Let's use them.
At the time this custom delegate was implemented, Kirigami.BasicListitem
didn't have the ability to easily display custom items inside itself.
Now it does, so we can port to that to save some code and increase
consistency.
The appearance is virtually identical and the UX remains the same with
the exception that you can now select an item by clicking anywhere on
the background, not just on one of the radio buttons.
the Text.Fit sizing policy will size the font in order to fit given a fixed
size of the label, but it can't really cause the other way around which we need:
cause a vertical resize in order to accomodate a larger font.
In order to fake that, we fix the date label to an arbitrary tall height
(will overflow outside the applet) and then size the applet based on the label contentheight instead,
leaving the invisible part of the label outside.
In order to avoid the huge text it used to have, limit the maximum size to an arbitrarly
small value, in this case
Math.min(0.7 * timeLabel.height, theme.defaultFont.pixelSize * 1.4)
BUG:417852
FIXED-IN: 5.21
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.
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
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