SUMMARY This bug was first reported at: https://krita-artists.org/t/expanding-spacer-is-it-an-display-error-or-a-minor-bug/24979 on Windows 10 and SUSE Linux for various versions. I tested it with the Jun 10 5.0.0-prealpha (git 7aef95) appimage, then the 4.4.5, then the 4.4.3 appimages on Debian 10. STEPS TO REPRODUCE 1. In Settings - Configure Toolbars, add Expanding Spacer items to the main toolbar and Bbushes and stuff toolbars, then press Apply 2. Close then reopen krita. OBSERVED RESULT 2.A) With the 5.0.0-prealpha, the 'Brushes and Stuff' toolbar has Expanding Spacers with the text "Expanding Spacer" in them. The 'Main toolbar' has Expanding Spacers with no text in them. 2.B) With 4.4.5 there is mixed empty space and text on both Toolbar parts. 2.C) With 4.4.3 there is only one text filled space on the main toolbar part. EXPECTED RESULT 1. The Expanding Spacers should be empty space. SOFTWARE/OS VERSIONS Krita Version: 5.0.0-prealpha (git 7ae3f95) Languages: en_GB, en, en, en_GB, en Hidpi: false Qt Version (compiled): 5.12.9 Version (loaded): 5.12.9 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 4.19.0-16-amd64 Pretty Productname: Debian GNU/Linux 10 (buster) Product Type: debian Product Version: 10 Desktop: MATE OpenGL Info Vendor: "NVIDIA Corporation" Renderer: "GeForce GTX 750 Ti/PCIe/SSE2" Version: "4.6.0 NVIDIA 460.73.01" Shading language: "4.60 NVIDIA" Requested format: QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile) Current format: QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::CompatibilityProfile) Version: 4.6 Supports deprecated functions true is OpenGL ES: false
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.