Before Plasma 5.20, the system tray icons were always 22px in size and became
multi-row/multi column as the panel increased in thickness.
So far in the Plasma 5.20 development cycle, we have exposed the existing
`iconSize` setting to the user to allow them to determine for themselves how
big they want the icon to be, or whether to be multi-row/column.
However this is not exposed very intuitively, as you have to already know that
the icon size determines the number of rows/columns, or that the largest "Enormous"
size produces an auto-scaling icon behavior. In other words, the UI reflects the
implementation, rather than the user's expectation.
This commit changes around the UI to more closely approximate what the user is
likely to want to configure: the number of rows/columns. The new default setting
is an "automatic" mode, which approximates the 5.19 and earlier behavior whereby
the system tray switches to a two-row/column view when the panel becomes thick
enough. In addition, users can now force it to always display one or two rows/
columns.
A major difference is that no matter which setting is set, icons now always
expand to fill the available space, which brings them in line with the margins
used for other Panel widgets.
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 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: 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:
Expander arrow should hide when all icons are visible and no icon is hidden. When dialog with hidden items is hidden ListView does not update its count property - property is update on redraw. As a result expander arrow is still visible/hidden until user clicks on any plasmoid to show dialog.
BUG: 420924
Test Plan:
* select/deselect "Show all items" in settings, save, expander arrow should hide/show imidiatelly
* select almost all items to "Always shown", leave "Keyboard indicator" as "Shown when relevant". Press Casp Lock, expander arrow should hide/show correctly
Reviewers: #plasma_workspaces, #plasma, ngraham, broulik, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, broulik, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28180
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:
There was a slight issue introduced with D28109: the systray highlight can now cover up the icons it's highlighting.
This isn't really an issue with Breeze because it uses a line for a highlight, but it is for themes that use a filled-style highlight.
I set a z value for the highlight that should ensure it's now drawn only behind the icon.
Test Plan:
Tested with the //Mondrian// Plasma theme
Before:
{F8280717}
After:
{F8280718}
Reviewers: kmaterka, #plasma
Reviewed By: kmaterka
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29380
Summary: Some `onXyzChanged` signals do not send value - fix connection to use value directly from the sender.
Test Plan: Disable or enable plasmoid in System Tray setting - it should work correctly.
Reviewers: #plasma_workspaces, #plasma, ngraham, apol, broulik, davidedmundson
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29356
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:
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:
After D28144, some animations are now too long because they were inappropriately
multiplying a duration value. That's no longer necessary, so let's remove the
multiplication.
Depends on D28144
Test Plan: Various things that were a bit too slow before feel just right now
Reviewers: #vdg, #plasma, cblack
Reviewed By: #vdg, #plasma, cblack
Subscribers: cblack, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28238
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 I pin a Klipper widget and then click on a history item, the Klipper widget closes.
To fix this bug, we need to check if Klipped is pinned, but to be able to do this, we also need to "forward" the pinned state from the SystemTray applet to the Klipper applet.
BUG: 416510
FIXED-IN: 5.19.0
Reviewers: ngraham, #plasma
Reviewed By: ngraham
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28408
Summary:
Else the entry is still in cfg_shownItems/cfg_hiddenItems and the config UI will display it as shown instead of disabled.
BUG: 419197
Reviewers: #plasma, kmaterka, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28311
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 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: 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:
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:
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:
Depends on D27465
@ngraham recommended that I split up https://phabricator.kde.org/D27438 into three patches:
1. The foundation code to get landed first so that the other two patches can be done as patches that change two separate lines instead of just one
2. Tablet Mode increases tray icon spacing
3. This patch - Increase tray icon spacing slightly on Non-Tablet Mode (half of the amount it increases by in Tablet Mode)
This patch is for the third patch of the three recommended patches to split the original patch into, and makes the click areas for the System Tray Plasmoid slightly larger in normal Plasma.
Test Plan:
1. Install this patch to the System Tray Plasmoid
BEFORE:
{F8109485}
AFTER:
{F8109489}
Reviewers: #vdg, niccolove, ngraham
Reviewed By: #vdg, niccolove, ngraham
Subscribers: kmaterka, gvgeo, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27466
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: 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:
@ngraham recommended that I split up https://phabricator.kde.org/D27438 into three patches:
1. The foundation code to get landed first so that the other two patches can be done as patches that change two separate lines instead of just one
2. Tablet Mode increases tray icon spacing
3. Increase tray icon spacing slightly on Non-Tablet Mode (half of the amount it increases by in Tablet Mode)
This patch integrates both patch 1 and 2 of what ngraham recommended to make system tray icon click areas larger when Kirigami's Tablet Mode setting is true than they normally are.
Test Plan:
1. Test that System Tray still works after these changes have been made
2. Check that when Kirigami.Settings.tabletMode is enabled the system tray icon click areas become slightly larger in size
Reviewers: ngraham, #vdg, #plasma, niccolove
Reviewed By: ngraham, #vdg, niccolove
Subscribers: davidre, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27465