PlasmoidPopupsContainer.qml has special code to handle merging headers
from applets if those applets use a PlasmaComponents3.Page instance as
their FullRepresentation. However this breaks for any applets that use
PlasmaExtras.Representation, which is a subclass of it that we have been
porting applets to over time, because it offers more features in a
single location. This caused the detection to break, so such applets
woudl have their headers improperly merged.
Explicitly detecting the use of PlasmaExtras.Representation as well
fixes it.
BUG: 438178
FIXED-IN: 5.24
Currently, applet can lose keyboard focus if you click on one of the buttons in its header, after which if you collapse and expand the applet again, the focus will remain on this button. This is extremely inconvenient if you prefer to use the keyboard to work with the applet (for example, with the Clipboard applet). This patch set keyboard focus back to the applet after switching the active applet (as well as after collapsing/expanding it).
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 system tray will use a fading animation between applets instead of the usual sliding animation; as the sliding animation does not work well when adapted to work vertically.
Before this patch, the system tray always animated sliding to the left when switching between items. Now system tray items will slide according to their order on the panel. Clicking an item to the left of the active icon will cause the sliding animation to slide that direction as well, and same for the an item to the right of the active item.
This pairs a shortened duration with an easing curve to the sliding transition when going between items, which improves the general UI polish while also feeling snappier.
Refactor and simply logic of "expanded" state when dialog with active applet or list of hidden applets is shown.
Fixes a problem with keyboard shortcut activation.
It also fixes a bug when dialog closes on "go-back" button click.
BUG: 427685
FIXED-IN: 5.21
CCBUG: 400278
Summary: This adds a footer element that will replace with a possible footer that the contained plasmoid could have, given that they are using a Page.
Test Plan: {F8258401}
Reviewers: ngraham
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D29142
Summary:
When the applet is a page with a plasmoidHeading as header, merge it with systray one.
{F8215920}
The only big problem is that it looks bad when you open said applet while in sidebar view, see:
{F8215916}
I'd like to solve that by removing the sidebar and adding a back button, but that would be for another patch in the future.
Test Plan: To be tested together with D28467
Reviewers: #plasma, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: mart, manueljlin, ognarb, ngraham, plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D28575
Summary:
Few unrelated fixes, bunched together:
* move some code from main.qml to PlasmoidItem where it belongs
* easier to understand item size calculation
* where possible, replace parent.parent comparisons with a property in AbstractItem
* get rid of marginHints
* Qt 5.14 compatibility fix in configuration
* formatting etc
Test Plan: Everything should work as before, this is just refactoring.
Reviewers: #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27085
Summary:
System tray widget had the following UX problem:
Icons are laid out in a Flow QML layout, using minimal amount of
space, thus not filling the height/width of the task bar. In other
words: user can only click directly on an icon, not over or under it.
Consider the following scenario:
Given icon size X and task bar of height 1.5 * X located at the bottom;
User moves pointer down to the limit and tries to click the icon.
Expected outcome: applet is activated.
Actual outcome: nothing happens, because icon (together with mouse
area) floats slightly above the bottom.
Which is inconvenient, especially when most other widgets tend to fill
up the space.
This patch fixes aforementioned problem by refactoring layouts using
modern GridLayout, RowLayout et al., so that icons are arranged in
rows and columns based on their number, and each one fills up its
cell. I also made a handful of minor internal refactorings and fixes.
Unfortunately, due to tight coupling, almost all files needed changes
anyway.
Special note on 'CompactApplet.location': it didn't seem to affect
anything at all, so removed it.
At the end of the day no visual changes should be noticeable. Layout
works in both vertical and horizontal form-factor an all four sides of
the desktop.
Test Plan: Please, check whether 'LayoutMirroring' works properly.
Reviewers: #vdg, #plasma, broulik, mart, hein, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: aacid, davidre, davidedmundson, ngraham, ndavis, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19745
Summary:
Fixes the issue most noticable with klipper's text field not having
focus; though use of debug rectangle showed it affected all applets.
Plasma popups get focus, which is given to our StackView, because that's a
focus scope that will give activeFocus to the focussed item within that scope.
However, nothing was explicity set, so nothing got focus.
Test Plan:
Debug rectangles followed by checking the original bug of opening klipper twice and on
both occasions typing immediately went into the text box
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3988
when an applet is deleted, remove its fullrep from stackview before
the applet actaully goes away, as QQC1 StackView remains in an inconsistent
styate if one of its pages is deleted without having been fully removed
reviewed-by: kbroulik
BUG:373812
Summary:
A lot of applets have independent handling making escape close the
expanded representation. However not all of them do.
This leads to both duplicated code and inconsistencies, so we should
tackle this at the source.
If an applet was already using escape internally it will be accepting
the event, and so this code will not cause any regressions.
This patch also removes the stackview forwarding events to the active
child as this doesn't make sense - the active child will already have
focus and get the key event first, so this just created a recursive
chain (which Qt was thankfully fixing for us). Removing it is needed for
this to work.
BUG: 362657
Test Plan:
Pressed escape on various applets (e.g plasma-pa)
Pressed escape on the expander applet list view
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3257