Allow the Panel to get active keyboard focus via a kwyboard shortcut which will cycle between all panels.
When a panel has focus, the active focus can be navigated around either with tab/backtab or arrow keys.
Simple popup applets which only display an icon will work automatically,
Complex applets like the System tray or the taskbar will have focus that can navigate on all their sub-elements, to activate a particular systray applet or activate a particular window
Co-authored with Benjamin Port<benjamin.port@enioka.com>
CCBUG: 352476
We can leverage the `priority` property of QActions, which is Normal (128)
by default, and hide it from systray header if the priority is set to
LowPriority (0).
BUG: 446396
This patch fixes an issue where action remain disabled after changing its
visibility off/on by filtering actions and creating buttons for visible
actions only. It also slightly improves the code.
This code was trying to filter out the configure action but failing
because it was comparing a QMenuItem to a QAction. We need to compare
the QMenuItem's internal QAction in order for the configure action to
ever match.
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`
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
the comboboix of a very rarely used feature right
in the header area is super noisy, looks misaligned and puts the feature
in a too much prominent role.
Put everything under a popup menu, mustually exclusive actions will be
shown as radiobuttons
Today on master, the system tray menu *always* shows a back button, regardless of the context.
But when all items are visible, the back button simply acts as a "close" button, since we are
only "one layer" deep and there is nowhere to go back to. This commit fixes that issue by only
displaying the back button hen the hidden items view has any items in it such that you could go
back to it.
Without this, the only way to show the config window for the System Tray
itself is by right-clicking, and as we all know, this is a no-no because
many users don't right-click on stuff and you can't right-click at all on
touch and we want our stuff to work on convertible devices with
touchscreens. So let's add a big beautiful button that people can click
on and touch.
This improves the applet in a variety of ways:
- Much more touch friendly than the current skinny list view
- Many more items can be displayed without needing to scroll
- Substantial code simplification
- UI improvement from no longer sometimes showing an awkward vertical
strip of icons that was invisibly scrollable but some of whose items
ate scroll events, and which pushed the header over to the left in a
somewhat random-looking way
BUG: 402681
FIXED-IN: 5.20
Summary: Currently, there was some code to avoid system tray resizing. However, being the properties not set to the root element, this was not having any effect. This fixes it.
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29824
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:
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 is a pre-existing problem, but became much more visible with D27189 (thus exposing
one of the reasons why I like visually separating dissimilar elements so much).
Essentially the dialog's bottom and right margins were not being properly mirrored on
the top and left, leading to the applet's content view looking off-center. Various apps
were locally adding their own extra top margins to compensate for this, which can be
removed once this patch lands.
This patch fixes that by explicitly using the default dialog margins for those edges.
I will submit follow-up patches to fix applets that were adding extra padding that is
now unnecessary.
Test Plan:
It was especially noticeable with D27160.
Before: {F8180273}
After: {F8180272}
Reviewers: #vdg, #plasma, cblack
Reviewed By: #vdg, #plasma, cblack
Subscribers: cblack, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28089
Summary:
This add a top area based on the current theme. If the file is not in the current theme, said area is not shown.
Problem: the header is moved to the right by the Svg element, and I'm not sure how to align it correctly anymore.
Depends on D27695
Test Plan: {F8088058}
Reviewers: #vdg, #plasma, ngraham
Reviewed By: #vdg, ngraham
Subscribers: mart, ngraham, ndavis, plasma-devel
Tags: #plasma
Maniphest Tasks: T10470
Differential Revision: https://phabricator.kde.org/D27189
Summary: With other two patches, this aims to make leftMargin consistent in widgets (See https://phabricator.kde.org/D26945 and https://phabricator.kde.org/D26944)
Test Plan:
System tray
Before:
{F7977382}
After:
{F7977379}
Notifications
Before:
{F7977359}
After:
{F7977357}
Battery monitor
Before:
{F7977362}
After:
{F7977361}
Self reminder: networkmanager is still slightly badly aligned
Reviewers: #vdg, #plasma, ngraham
Reviewed By: #vdg, ngraham
Subscribers: gvgeo, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26946
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 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
Summary:
This removes hacks and does things in a cleaner way.
Credits go to @broulik.
Reviewers: #plasma, broulik, ngraham
Reviewed By: ngraham
Subscribers: ngraham, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25614
Summary:
Currently the code that draws plasmoid popups utilizes an anchor based approach.
I think layouts are a more elegant solution so this patch makes use of them.
Test Plan:
{F7616902}
{F7616901}
{F7640510}
Reviewers: #plasma, #vdg, ngraham, mart
Reviewed By: #plasma, #vdg, ngraham, mart
Subscribers: safaalfulaij, manueljlin, ognarb, ngraham, kmaterka, mart, GB_2, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24720
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:
1. Remove the left margin.
2. Change '&' to "and".
Before:
{F6474493}
After:
{F6476224}
Test Plan: Open System Tray.
Reviewers: #vdg, broulik, #plasma, mart
Reviewed By: #vdg, #plasma, mart
Subscribers: fabianr, abetts, loh.tar, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17556
Summary:
this avoids some unwanted scene changes and speeds up the
first open a bit, also initialize the size of the dialog main item
so there is a resize less when the Dialog is first shown
Test Plan:
difference in show time is already visible, tough still not perfect,
something else needs to improve as well
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: apol, broulik, hein, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10692
Summary:
In the system tray we have a header at the top and the icons on the
left.
When there is no applet selected we want the icons to take up the full
width, because of this they have to start off under the title.
When an applet is selected we want these icons to dock to the left, but
not change their y position. The title then becomes the title of the
active applet.
If the active applet's title wraps this results in the icons moving all
over the place. See image in bug report.
This patch uses two text fields and toggles visibility so that we can
always align the icons to a consistent point
BUG: 378194
Test Plan:
Opened system tray with the arrow
Clicked on an applet and back
Opened system tray by clicking on applet
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5300
This ensures contents of the popup gets mirrored and the sidebar is moved to the
right and applets don't overlap it.
The expander arrow is not (yet) adjusted as this is much more complicated to solve.
Differential revision: https://phabricator.kde.org/D2048
Remove almost completely duplicated function.
One was used for right clicking on expanded items, the other for full
compact items.
A missing action for expanded items is added so the two menus are now
consistent.
Global co-ordinates are used as args for menus everywhere so we can
share the mapping code SNIs currently use.
REVIEW: 125973
Somehow key events no longer end up in the expanded task, this could be related
to the fact that we now have a proper ScrollView instead of a plain ListView/Flickable.
REVIEW: 126293