In most cases the port is trivial and can even simplify the code like in
the case of the system tray applet. In the case of notifications applet,
this is causing a bigger refactor and it's now also using a TextArea
that provides the automatic scrolling when selecting behavior.
CCBUG: 437155
Fix a visual glitch that caused the icons and highlight of the items in
the HiddenItemsView of the systray to be blurry. This commit fixes this
by preventing the items from being positioned in a non-integer position.
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 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:
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: 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:
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:
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:
it's very rare that the icon list in the hidden area
of the systray is long enough to get a scrollbar, but
when it does it had a couple of issues:
sometimes it gets an horizontal scrollbar too and
the wheel events gets eaten:
always disable the horizontal scrollbar and
ignore wheel events over the label.
wheel events over the icon are still managed by
the applet (so still possible to for instance
adjusting the volume on pa applet)
BUG:372050
Test Plan:
hidden all the cions to enable scrollbar: wheel over
the text scrolls the view, over the icon adjusts the volume
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3263
Summary:
it's very rare that the icon list in the hidden area
of the systray is long enough to get a scrollbar, but
when it does it had a couple of issues:
sometimes it gets an horizontal scrollbar too and
the wheel events gets eaten:
always disable the horizontal scrollbar and
ignore wheel events over the label.
wheel events over the icon are still managed by
the applet (so still possible to for instance
adjusting the volume on pa applet)
BUG:372050
Test Plan:
hidden all the cions to enable scrollbar: wheel over
the text scrolls the view, over the icon adjusts the volume
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3263
it's way simpler and more reliable than using it trough ObjectModel
ObjectModel seems good enough if items are always owned by one
but not when going back and forth between 2 models