Krita 5.2.0-beta1 The new reorganized start screen (with the donation banner at the top and deactivated dockers section) has added extra steps for the docker plugin I'm writing. The plugin allows you to create a new Krita project and sets some settings like the color model, profile, bit-depth, along with creating a whole layer/filter stack. It's opinionated due to purpose: creating normal maps and other PBR maps for realtime engines. So, it won't let you even choose the CMYK model or one of the float bit depths (because the height to normal filter doesn't work with those at all), for instance. In previous Krita versions, the docker plugin would be available from the start screen and you could start a new project from there, but with the new start screen, you have to create a new image first, and only then can you create a new project from my docker plugin. This also means you now have two documents open by default: the blank one and the one you actually want to work on. Not sure what the solution is, but is there any way to add functionality to set a property on a docker that will show it on the start screen? I assume the new start screen is just looping through dockers and hiding everything, and then unhiding when a document is created, because it's possible to unhide it manually from the start screen, but that setting is not persistent. Actually, unhiding only works on startup, not if you've closed a document and end up back on the start screen. Interesting. Anyway, just adding an if check to that hiding/unhiding function for a certain visibility property on the docker would seem like a solution, right? Alternately, I guess I could create a separate extension that would be available from the Tools > Scripts menu whose sole purpose is to create a new project, but that's pretty janky and not at all discoverable, on top of asking people to install and activate two plugins... Or a section on the start screen that is addressable from Python, where you can register a widget (even just a single button would be enough to launch a new project creation window). Or, something like Maya's custom "shelf" where you can pin scripts to it, which would be part of the standard UI and therefore persistent (like the new document, open existing document, save, etc. section at the top left). I dunno, I'm just spitballing now.
(In reply to varkatope from comment #0) > Or a section on the > start screen that is addressable from Python, where you can register a > widget (even just a single button would be enough to launch a new project > creation window). Or, something like Maya's custom "shelf" where you can pin > scripts to it, which would be part of the standard UI and therefore > persistent (like the new document, open existing document, save, etc. > section at the top left). I dunno, I'm just spitballing now. Well, I managed to add a new QToolBar and QToolButton to the main window from within my docker plugin, which would do the trick, but that took some doing because on first load, the qwindow() doesn't exist yet and will throw an error unless you use a Notifier for windowCreated. Then I wanted to only have it appear on the start screen since once the Docker is loaded I can just go from there, but then if I started a few new projects I would end up with multiple QToolButtons in the tool bar, so I had to start and stop Notifiers for imageCreated and imageClosed to activate and deactivate the tool bar depending on what was open or closed, which still isn't working quite right but at least I only have one QToolButton at any one time, and it didn't look right so I had to use addAction instead of addWidget and then setStyleSheet('QToolBar{border:none}') and it finally looks OK, BUT THEN I managed to insert a tool button into the "Start" area and that presented its own set of challenges, plus it could break at any time if y'all decide to rename 'verticalLayout_4', for example, but at least I don't have to mess with the other Notifiers, so that's probably what I'm going to stick with for the moment and hope it doesn't break in future versions... My point is that it would be cool to have some sort of helper function in Krita's API for plugin developers that would simplify adding either a tool bar to the qwindow() or tool button to the welcome page now that there is one (or both!), and to inherit the style of the existing UI by default (no border if QToolBar, or setAutoRaise(True), QSize(48,48), setToolButtonStyle(3) if QToolButton, that sort of thing), because I'm pretty "in the weeds" on the Qt side at the moment and it stings a bit. Sorry for the non-"bugreportyness" of this "bug report." Do with it what you will.
We should probably add some custom property for a docker not to be hidden in the main screen...
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1957
Git commit 10b59e95ceb2300a8f8b62e291e4ea58c51da59d by Dmitry Kazakov, on behalf of Halla Rempt. Committed on 23/10/2023 at 12:12. Pushed by rempt into branch 'master'. Add a flag for dockers that should be shown on the welcome screen Dockers are meant to work on the currently open canvas, but over the years we have created several dockers that are supposed to be open if there's no canvas. Setting the property "ShowOnWelcomePage" on the dockwidget will override hiding that docker on the welcome page. M +2 -1 libs/flake/KoDockFactoryBase.h M +6 -6 libs/ui/KisMainWindow.cpp M +2 -2 plugins/dockers/logdocker/LogDocker.cpp M +1 -0 plugins/python/comics_project_management_tools/comics_project_manager_docker.py https://invent.kde.org/graphics/krita/-/commit/10b59e95ceb2300a8f8b62e291e4ea58c51da59d
Git commit b982457181d151493a7bff7680257bbb57b802b1 by Halla Rempt. Committed on 23/10/2023 at 16:14. Pushed by rempt into branch 'krita/5.2'. Add a flag for dockers that should be shown on the welcome screen Dockers are meant to work on the currently open canvas, but over the years we have created several dockers that are supposed to be open if there's no canvas. Setting the property "ShowOnWelcomePage" on the dockwidget will override hiding that docker on the welcome page. (cherry picked from commit 10b59e95ceb2300a8f8b62e291e4ea58c51da59d) M +2 -1 libs/flake/KoDockFactoryBase.h M +6 -6 libs/ui/KisMainWindow.cpp M +2 -2 plugins/dockers/logdocker/LogDocker.cpp M +1 -0 plugins/python/comics_project_management_tools/comics_project_manager_docker.py https://invent.kde.org/graphics/krita/-/commit/b982457181d151493a7bff7680257bbb57b802b1