Some actions, such as middle click to mute, trigger only on press. Some applets
also need a pressed-click because of some legacy autoclose on focus change
bug.
Unfortunately, QML does not disambiguate the "pressed" property and "pressed(mouse)"
signal with argument, so this has to be done awkwardly through QMetaObject on C++ side.
BUG: 426646
BUG: 452893
FIXED-IN: 5.25.0
(cherry picked from commit f045cf306c)
If preferred, compact and full represenation are set to the same value,
the value of appletShouldBeExpanded will be true, which means the applet
will be expanded by default. In this case, only fullRepresentation will
be created and compactRepresentationItem will simply be null.
If compactRepresentationItem is null, also check the fullRepresentation
for mouse event forwarding.
This fixes manage-inputmethod applet not working if it's hidden in the
tray.
Discover current minimum height of applet labels in hidden
view and apply it for all of them when they are shown
inside hidden applets view. This implementation provides
always only the maximum needed label height based on label
contents.
BUG: 438347
FIXED-IN: 5.24.3
The prefered is to show context menu on mouse pressed event, not click,
but this causes few issues for SNI.
Some legacy applications still relies on XEmbed to show tray icon.
We use xembedsniproxy to relay the mouse press signals to the XEmbed client
but some applications (including GTK) validate the mouse state.
Mouse released state is expected, but as it is still pressed context
menu does not show.
BUG: 409768
FIXED-IN: 5.24.3
With the keyboard navigation patch there is the issue that sometimes,
due to sorting by SortFilterModel, the stack order of the items doesn't
correspond to the visual order of the items.
This is a problem wrt the recently introduced keyboard navigation, as
the tab order of items in qml is completely tied to the stack order,
resulting in an erratic tab navigation order (usually happens with
device notifier or bluetooth applets for instance)
StatusNotifierItem.qml does not explicitly handle the case of
right-clicking, which causes right-clicks to be ignored unless you also
happen to have the libappindicator package installed, which injects a
handler for this itself. But this should work even if you don't have
that package installed; this commit fixes it.
BUG: 449870
FIXED-IN: 5.24.1
The MouseArea in AbstractItem needs to be above applets
when it's in the grid hidden area so that it can receive
hover events while the mouse is over an applet
But when the applet is shown as an icon on the regular
systray it needs to be below so the PlasmoidItem `onClick`
takes precedence and systray collapsing works.
BUG: 449533
FIXED-IN: 5.24
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
Applets in PlasmoidItem were blocking events from reaching the
ToolTipArea, so I moved the on hover logic to the AbstractItem's
MouseArea and put the MouseArea over the iconContainer. The
iconContainer is the parent of applets. Presses tend to hit the center,
which is where the applet is, preventing ToolTipArea::containsMouse from
being true and preventing the highlight from moving to the pressed item.
Hopefully this doesn't cause duplicate actions when events reach the
applet. I tested the patch on the nightcolor applet and all the other
default applets and didn't see anything wrong. I think this may be
because the signals are sending QML MouseEvents to the applets, causing
them to be accepted if the applet can accept them. Then when the signal
handlers are done, since the events are already accepted, they should
not move beyond the MouseArea and cause another round of event handling.
An input type agnostic way to activate systray items was needed. This
signal will be used for keyboard, mouse and touch navigation.
There was an activated() function that just started an animation which
has been renamed to startActivatedAnimation().
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`
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 solves the problem when the user clicks the padding around the applet or its label. The event is now correctly redirected to the applet.
This fixes both the left button and the middle click.
BUG: 426646
FIXED-IN: 5.21
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.
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
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.
This begins the process of porting plasma-workspace to PlasmaComponents3. At
this point, only the relatively easy work is done. Every file not ported
now has been given the reason for still using PC2 in a comment on the import
line so you can see at a glance what the blocker is by running
`grep -r "org.kde.plasma.components 2.0"` in the repo.
Everything is tested and there are no breakages or functional regressions. In
the process, a few unused imports are removed.
Here are the remaining PC3 omissions blocking what's left from getting easily
ported:
- No Highlight
- No ListItem
- No PageStack
- No ContextMenu
- No QueryDialog
- No ModelContextMenu
- TabBar has no left and right tab states
- ToolButton has no built-in method to show a menu when clicked
This makes sure that the text doesn't touch the edges of the highlight
rect with languages that have very long words, like German and Brazilian
Portuguese.
--systemtray items are now using a rectangular form
in order to specify their hit area. So they take into
account the panel thickness in order to calculate
properly their cell length and thickness to
respect Fitt's Law. Items that are nearer to the
screen edge can now trigger all their events when
the user uses its mouse at the farest of the screen edge.
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
Add configuration UI for setting maximum icon size. This utilizes existing configuration parameter. It is a maximum allowed icon size, if panel is smaller, icon will fit to closest smaller size.
BUG: 360333
BUG: 355587
FIXED-IN: 5.20.0
Summary:
In some rare situations SNI icons are not rendered. It happens randomly, only some users are affected. It does not happen on every login.
Only SNI icons are not rendered, Plasmoids are fine. Restarting plasmashell or re-adding systemtray applet helps.
In QML all roles need to be defined before model is used. When data engines is used a a source for a data model, all roles has to be defined and proper value assigned (not a null QVariant). StatusNotifierItemSource does this properly, but in some situations it sets null QVariant for Icon. Setting empty/null QVariant removes key/role from the date set (DataConteiner implementation). If data model was loaded earlier or later when Icon has proper value it will work properly. In some rare situation it is possible that data model is loaded when Icon has null value assigned (in other words - removed), role is removed from the data model and not avaiable to system tray applet.
This fix makes sure that there is always a value for Icon role. To check if icon is null native method has to be used - QML does not understand that QIcon can be null.
BUG: 419305
FIXED-IN: 5.18.5
Test Plan: I don't have any reliable method to reproduce this issue.
Reviewers: #plasma_workspaces, #plasma, davidedmundson, broulik, ngraham
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29386
Summary:
After adding a new plasmoid (applet), for example a new Media Player, several empty icons are rendered in the system tray which hides existing icons.
The bug occurs after opening Gwenview while the Media Player applet is NOT in use.
The systray icons reappear when Gwenview is closed or another source starts playing.
BUG: 418662
Test Plan: Start Gwenview when Media Player is not in use. All icons should render correctly.
Reviewers: #plasma_workspaces, #plasma, ngraham, broulik, apol, davidedmundson, mart
Reviewed By: #plasma_workspaces, #plasma, mart
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29344
Summary:
It was decided in T12778 to remove icons from tooltips for panel widgets and system tray
items. This patch implements that for system tray items, and removes the supporting code
from the backend.
Test Plan:
Apply patch
Hover the cursor over system tray items, either in the compat applet or the expanded
representation
No more redundant or inconsistent icons visible
Reviewers: #plasma, davidre, broulik, kmaterka
Reviewed By: kmaterka
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T12778
Differential Revision: https://phabricator.kde.org/D28631
Summary:
The previous patch updates the pinned state only for the active applet. For instance, if you open the Networks applet and pin it, then switch to the Clipboard applet and click on the history item, then the Clipboard applet closes. This is because we need to use binding instead of assignment.
See https://phabricator.kde.org/D28408.
Reviewers: ngraham
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28483
Summary: When none of the valid conditions are met, function should return default value for ItemLoader source. If not, error is printed in logs.
Test Plan: No warning about undefined value for url
Reviewers: #plasma_workspaces, #plasma, ngraham
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28259
Summary: This change simplifies icon size logic - now it is controled only in one place: AbstractItem. This gives additional benefits, like icons perfectly centered.
Test Plan: Highlights should always be centered
Reviewers: #plasma_workspaces, #plasma, ngraham, broulik, davidedmundson, apol
Reviewed By: #plasma_workspaces, #plasma, ngraham, broulik
Subscribers: mart, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28109
Summary: The `effectiveStatus` parameter was passed as a copy, use proper binding.
Test Plan: No visible impact
Reviewers: #plasma_workspaces, #plasma, ngraham, broulik, davidedmundson, apol
Reviewed By: ngraham
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28185
Summary:
For very narrow panel item size is too big (item + padding exceed panel size). This adds a check to not exceed panel size.
Before:
{F8167941}
After:
{F8167942}
Test Plan:
* Make panel very narrow - icons should fit into panel
* Repeat for vertical/horizontal
Reviewers: #plasma_workspaces, #plasma, ngraham, broulik
Reviewed By: ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27958
Summary:
Use the unified data model everywhere, not just in configuration. This simplifies UI code, separetes presentation from data.
This requires the use of ListView and GridView.
This change enables the implementation of more advanced sorting algorithms for systemtray items.
Test Plan: Affects almost all areas of system tray.
Reviewers: #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Reviewed By: #plasma_workspaces, #plasma, davidedmundson, ngraham
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26992
Summary:
When having expanded System Tray once, plasmashell crashes on teardown.
Fixes regression introduced in D27085.
BUG: 417552
FIXED-IN: 5.19.0
Test Plan:
1. Start plasmashell
2. Open System Tray popup, close it again
3. run kquitapp5 plasmashell, it should not crash
Reviewers: #plasma_workspaces, #plasma, broulik, ngraham
Reviewed By: ngraham
Subscribers: anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27401
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:
Combines settings of SNI icons and plasmoids in one list. Ability to disable whole section is removed.
Initial idea was proposed by Nicolas Fella (D22176).
BUG: 360307
FIXED-IN: 5.18.0
{F7880936}
Test Plan:
1. Disable/enable plasmoids
2. Set Shown/Hidden for plasmoid
3. Set shortcut for plasmoid
4. Previously hidden categories are shown
5. Show all icons and revert
6. Set Auto/Shown/Hidden for SNI icons
Reviewers: #plasma_workspaces, #plasma, davidedmundson, broulik, ngraham, mart
Reviewed By: #plasma_workspaces, #plasma, ngraham, mart
Subscribers: ahiemstra, mart, meven, nicolasfella, plasma-devel, ngraham
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26586
Summary: Both for plasmoids and SNI
Test Plan: Now there's some kind of feedback when pressing the icons
Reviewers: #plasma, ngraham
Reviewed By: ngraham
Subscribers: filipf, broulik, anthonyfieroni, davidedmundson, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19947