Skip to content

Implement a resize capability in the Plasma dialog

Luca Carlon requested to merge lcarlon/plasma-framework:resize_dialog into master

This patch is part of my attempt to fix bug #332512. The request was to make dialogs resizable, so that it is possible to resize popups. This patch only adds the capability to the dialog class, other patches are needed to bring the real feature to the user. This patch is intended as transparent for elements not using the resize capability.

There are a couple of critical points. Dialog type: it seems that on Wayland the dialog type is set to dock, which makes the surface not resizable. I had to change this to normal to make it work. Not sure if this is acceptable. Another critical point is in the event handling method. There is a piece of code that seems to redirect into the main item events that are actually outside it. In my code, I had to call the base class and bypass that portion when inside the resizing area. I'm not sure about the implications of this elsewhere.

An example of usage of this patch is: lcarlon/plasma-workspace@cbbceb31. I still have to prepare a MR for it.

A demo of the expected result (requires both patches): https://youtu.be/iSZcLh2yL1E.

Edited by Luca Carlon

Merge request reports