https://bugs.kde.org/show_bug.cgi?id=506327

[email protected] <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |red.flames.1337@googlemail.
                   |                            |com

--- Comment #7 from [email protected] 
<[email protected]> ---
Can confirm this bug still exists in 5.2.15 sadly

For a while I had been hoping the fix for this would get merged into 5.2 but it
seems that won't happen. This bug got fixed in MR 2408 as best as I can tell
(...I haven't tested any nightly builds or anything, I'm just on stable...)

https://invent.kde.org/graphics/krita/-/merge_requests/2408

...which happened back around May of 2025.

Searching the commits I can see the commit from the MR in master but not in any
5.2 branch or even in release/5.3.0-prealpha
https://invent.kde.org/graphics/krita/-/commits/master?ref_type=heads&search=fix+floating+toolbars

Personally I do always have the "Brushes and Stuff" toolbar floating, I have
Krita in fullscreen with the menu bar and I kinda just float it over the top
right of the window where not much is going on anyways.

I've been trying to write a python script to fix the toolbar but with no luck
so far (like three times now I've been convinced that that things I did to the
pyQt5 QToolBar object or with Krita instance actions were making it visible
again, but nope.)

Best I've come up with is going into "Settings > Configure Toolbars..." and
just... dragging the lowest item on the right side, which doesn't actually
change any of the order there, but enables the "Apply" button that is otherwise
disabled.
At that point I might as well go "Settings > Toolbars Shown > [...]" and toggle
that toolbar off once and on again. 

Just kind of mildly annoying to have to do this at every launch :P

...Actually, after some hours I sort of _do_ have it fixable with scripting.


> from krita import *
> 
> app = Krita.instance() 
> currWin = app.activeWindow()
> qWin = currWin.qwindow()
> 
> for a in app.actions():
>   if "hide brushes and stuff" in a.text().lower():
>     a.trigger()
>        
> for a in app.actions():
>   if "show brushes and stuff" in a.text().lower():
>     a.trigger()
> 
> # optional stuff, I like making it undockable, not sure if any of the other 
> settings are important here
> for tb in qWin.findChildren(QToolBar, "BrushesAndStuff"):
>   tb.setWindowFlags(QtCore.Qt.Tool | QtCore.Qt.FramelessWindowHint)
>   tb.setAllowedAreas(QtCore.Qt.NoToolBarArea)
>   tb.move(-1883, 1440)
>   tb.adjustSize()

Apologies if that looks mega scuffed, couldn't figure out of there's Markdown
here for code blocks. But just throw that at the "Tools > Scripts > Scripter"
and pray, maybe save it as a *.py file, set it as a "Tools > Scripts > Ten
Scripts" shortcut and immediately hit Ctrl+Shift+1 after starting Krita. That's
what's currently finally making this easier for me lol.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to