Draft: plugins/overview: use DelayButton to delete desktops
We have been moving toward making it harder to trigger destructive actions by accident throughout plasma. One major exception is the button to remove virtual desktops in overview mode; while this cannot actually lose data, activating it accidentally can make it rather hard to restore the original arrangement - a new vd would have to be added and all windows on the intervening workspaces would have to be moved. It's also easy to trigger in fast operation, as the button makes up a good bit of the clickable area, especially if multiple rows are used. On the other hand, some workflows rely on frequent creation and deletion of extra virtual desktops, so the functionality has to remain easily accessible.
This change switches the button to a DelayButton that requires being pressed for 1 second to be activated. Short clicks are treated as clicks on the workspace to facilitate faster operation for switching. Details of the behavior are tweaked.
BUG: 450674
FIXED-IN: 6.4.0
Draft because:
- This would be our first real use of DelayButton I think. To me, this seems the best choice - alternatives would be to only show the button after a hovering delay (buttons appearing as a surprise still seem like something that can trigger by accident, as it might show up unexpectedly just as the user is about to click), immediately showing the button but only making it enabled after a hovering delay (seems a bit unusual and difficult to grasp), or having a confirmation dialog (probably annoying for people closing many virtual desktops). Having played with this version, the interaction pattern feels good to me.
- We don't have a PC3 version of DelayButton, so if we want this we should probably add one (QQC2 version looks ok though).