If the widget background provides a mask, put behind the background a blurred version of the wallpaper, cutted into shape by the opacity mask provided by the theme.
The containment property is assigned from qml so it can be bull. Also, if this component is used in a plasmoid that can run also in normal applet mode (i.e. folderview) it will be null in that case.
if we don't have a containment assigned yet, just do nothing in the signal handlers as they are supposed to read and write from the containment config
BUG:436041
Use a single timer instead of two and use flags for events that can
lead to a relayout. the flags at the moment are size change and config
key for serialization change.
if they happen in the same moment (for instance when the serialization
config key is dependent from the size) if the new key already is saved
consider it correct and don't try to keep the distance to screen edges
from the old layout, ruining the saved one
CCBUG:360478
as disabling editmode will stop dragging, sometimes a drag gets interruped
mid way due to lost of focus.
On Plasma Mobile applets are reparented when dragged, which resets
focus, breaking dragging immediately
When the component is completed the corona startup may not be complete
yet.
This causes a race condition when most of the times when a layout
is created from a lajout.js file, applets geometries don't get correctly
saved.
so reinvoke the save timer when the startup completed signal is emitted
from corona
BUG:433799
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`
it was technically possible for geometries to not be integer, but
a string to int parse was done, so teoretically string.toInt() can
fail and reset position/size of the plasmoid.
It may be the cause of some of the positions lost bugs.
This was particularly evident and triggerable in plasma mobile.
on palsma mobile side was also fixed by making suire the grid size is
always int, however technically the bug is here too as well
handles have to pop up on any background, as they will be on top of the wallpaper
adding a super light gradient which reminds breeze buttons, contrast pixel and
a shadow makes it easier for it to not get lost
When rotated most applets, especially text look garbage.
If we render into an offscreen buffer we can smooth things out and it
looks good again. There is a performance penalty to this, but most
people do no not rotate plasmoids.
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.
Summary:
Otherwise, setLayout function might be called for
already destructed instance of ItemContainer,
leading to double reference counter decrement of m_layout QPointer,
eventually invalidating such pointers prematurely.
BUG: 417603
Test Plan:
1) Unlock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)"
2) On desktop push right mouse button and select menu item 'Add Widgets...'
3) Add various widgets to desktop using drag'n'drop on desktop.
I've added at least following widgets on same desktop screen:
Audio Volume, Battery and Brightness, Binary Clock, Clipboard, Color Picker, Grouping Plasmoid, Quick Chat
4) Remove just added widgets in random order
5) If necessary, repeat steps 3 and 4 a few times
If widgets aren't appearing on desktop despite adding them via drag'n'drop, it's bugged and ready to crash. But it's not a requirement for crash.
6) lock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)"
7) repeat steps 1-6 multiple times
8) plasmashell shouldn't crash
Reviewers: ngraham, davidedmundson, mart
Reviewed By: davidedmundson
Subscribers: cfeck, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27650
Summary: CCBUG: 412114
Test Plan:
{F8116018}
(The icon size is too large by default but that's not a bug in this patch)
Reviewers: #plasma, davidedmundson, meven, ndavis
Reviewed By: meven, ndavis
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27530
Summary:
Same idea as D25998, but for desktop widgets and done on the C++ side to avoid weird
interactions between a MouseArea and a MultiPointTouchArea on the QML side.
Test Plan: {F7819381}
Reviewers: #vdg, #plasma, mart, apol
Reviewed By: #vdg, #plasma, mart, apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26015
Summary:
support the automatic shadow hint
When the hint is shadowedBackground, do an automatic shadow with a shader, and
change applet's color to complementary
Test Plan:
Tested the functionality on various applets. To test, the digital clock is enabling explicitly background configurability
{F7788553}
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25591
when items are moved around due to screen resolution change,
no cell should be considered as taken, because all items will be moved,
otherwise items will be moved and resized in unexpected ways to make
room for "ghost" items.
Clear the bookkeeping before doing the move
BUG:413019
Summary:
edit mode menu action
edit mode dbus property for systemsettings
containmentlayoutmanager goes out of edit mode only when the whole
plasma app loses focus, so the panel controlled doesn't make it go out
of it
Test Plan:
iaction shows in context menu, works
property exposed on dbus works
Reviewers: #plasma, #vdg, ngraham, GB_2, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, GB_2, davidedmundson
Subscribers: GB_2, ngraham, davidedmundson, plasma-devel
Tags: #plasma
Maniphest Tasks: T10190, T11094, T10402
Differential Revision: https://phabricator.kde.org/D24264
When asking for a specific layout direction, try very hard at all the
cells that are available in that given direction instead of always
start to compute at a new row and wrong column