Match Plasma panel edge areas for clicks and scrolling

This commit is contained in:
ajp_anton
2026-09-11 10:55:27 +00:00
parent 8719402d97
commit ccd0161398
8 changed files with 117 additions and 94 deletions
@@ -8,6 +8,7 @@ import "areas.js" as Areas
PlasmoidItem {
id: root
readonly property Item panelView: Areas.panelViewFor(root)
readonly property Item panelLayout: {
let item = root.parent;
while (item) {
@@ -26,10 +27,8 @@ PlasmoidItem {
preferredRepresentation: fullRepresentation
PanelSettings { id: settings }
PanelController {
active: root.panelLayout !== null && !(Plasmoid.containment.corona?.editMode ?? false)
locateArea: (x, y, scrolling) => scrolling
? Areas.scrollAreaAt(root.panelLayout, x, y, Plasmoid.formFactor === PlasmaCore.Types.Vertical)
: Areas.areaAt(root.panelLayout, x, y)
active: root.panelLayout !== null && root.panelView !== null && !(Plasmoid.containment.corona?.editMode ?? false)
locateArea: (x, y) => Areas.areaAt(root.panelLayout, x, y, root.panelView)
scrollActions: ({
empty: settings.values.emptyAction,
tasks: settings.values.tasksAction,