Summary: | More than two out of the four available expanding spacers across two toolbars cannot be displayed properly | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Ahab Greybeard <ahab.greybeard> |
Component: | Usability | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | halla, tomtomtomreportingin |
Priority: | NOR | ||
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Ahab Greybeard
2021-06-10 20:25:35 UTC
From what I can tell, the current implementation of expanding spacers is hacky and basically doesn't allow more than two expanding spacers across two toolbars to be displayed properly. Right now expanding spacers are implemented as pseudo-actions: https://invent.kde.org/graphics/krita/-/commit/e15a086bfc581a1f64ee803e87eb3ee067c60bd4 Upon further investigations, I noticed that modern versions of Dolphin and Kate have proper expanding spacers despite using the same toolbar framework as Krita. I am going to guess that they use some newer version of KXMLGUI or in some other way applied the following commit to their project: https://phabricator.kde.org/R263:4357ef235ecb8b8b71ca0867d6cfc02acf292fae Differential revision: https://phabricator.kde.org/D22609 Along with the fact that it could be used limitlessly, it would also no longer be treated like an action in other parts of Krita. Question to the maintainer: Would it be possible to replace the current implementation with the implementation used in the above commit? I do not know if there were additional improvements to the above implementation or how cleanly it would replace the current spacer used in the default BrushesAndStuff toolbar. (By the way, another feature I've noticed in Dolphin's and Kate's Configure Toolbars interface is that they allow the user to configure the Icon or Text for a particular action, so there can be other benefits in supporting a more modern version of KXMLGUI) Yes, it's probably possible to copy this stuff from the framework. The first reason we had for copying the kxmlgui framework into Krita was that our patches to make some level 3 frameworks optional weren't acceptable to the then maintainer. Half a year later, some very similar patches were accepted, but it was too late by then because by then we had hacked the shortcut settings code so it could fit into the krita settings dialog. We also renamed the xmlgui xml file from .rc to .xmlgui -- since it's not a runcommand type file. But it would be good to synch up again... Apparently the described issue technically doesn't only happen with expanding spacers: It basically happens with any special Toolbar action (Painter's Tools, Brush Composite, Gradients, Patterns, etc...) if you use them across both toolbars. |