The source project of this merge request has been removed.
Popup Widgets
Generalizes the concept of Krita's popup palette by allowing each of our tools to return any QWidget-derived popup widget, as discussed here.
As of now, this patch should mostly have parity with master, as the various Brush Tools should return the popup palette while the tools that previously returned options menus still return those same menus. Right now the only noticeable differences should be:
- Some tools (bezier, move, color sampler, assistants, etc.) do nothing except for a qDebug on right-click right now.
-
As a hacky test, the Calligraphy Tool spits out broken copy of its Tool Options
that can't be closed. - As a hacky test, the SVG Text Tool tries to display its editor window but doesn't. (Not really that noticeable I guess...)
Of course, these things will all be improved if we move forward. Here are some random ideas:
- More custom widgets like the popup palette! (Requires design and implementation.)
- On-screen tool options. (Probably requires some refactoring and homogenization of various Tool Options widgets.)
- Editor windows. (Like the text editor or maybe a gradient editor, for example.)
- Classic menus. (For old time's sake.)
- Tools that don't want/need to return a popup widget could be given an extra rightclick action function!
In order to support all of these types of things and more, we may need to create a standard interface, template or base class. I haven't quite thought that far ahead yet, but it'll be doable. :)
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Emmet O'Neill