Bug 461126

Summary: Toolbox background color doesn't update on enabled/disabled
Product: [Applications] krita Reporter: Freya Lupen <penguinflyer2222>
Component: DockersAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Freya Lupen 2022-10-28 17:13:29 UTC
Toolbox background color doesn't update on enabled/disabled.

1. Have the Toolbox docker visible.
2. Open or close a document, enabling or disabling the widget.
3. The icons will change color, but the background behind the icons won't.

5.2.x git hash e41db7b620.
This regression was introduced in daa7cdf7 (https://invent.kde.org/graphics/krita/-/merge_requests/1605 "Fix several theme related issues").
Comment 1 wolthera 2023-01-12 13:33:53 UTC
Hey,

I cannot rreproduce with the Krita Version: 5.2.0-prealpha (git 5c98a72) Appimage with Qt 5.15.7

Is this still relevant?
Comment 2 Freya Lupen 2023-01-21 21:27:41 UTC
Yes, I can still reproduce this on Windows (5.2.x-f5e7f50ac8) and Linux (5.2.x-5e666c0df9).

Strangely, the behavior appears to be different depending on platform; on Windows, opening a document causes the toolbox to look wrong,
while on Linux closing it causes it to look wrong. On both, if it's fixed by resizing the toolbox (or otherwise triggering it to update), it will become wrong again on the next enabled change (whether that is opening or closing the document).
Comment 3 Bug Janitor Service 2023-01-22 05:06:52 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 Bug Janitor Service 2023-02-26 22:18:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1760
Comment 5 Invent Merge Service 2023-02-27 12:34:18 UTC
Git commit bf30af1b6eb1a4acfe5270dcff57b127c8425201 by Merge Service, on behalf of Freya Lupen.
Committed on 27/02/2023 at 12:33.
Pushed by merge-service into branch 'master'.

Fix issue with toolbox background color

KoToolBox::changeEvent() overrode QWidget::changeEvent()'s
handling of the EnabledChange event, resulting in
the enabled state and color not changing.

Also corrects KisPresetLivePreviewView and KisHighlightedToolButton.

Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1760>

M  +1    -0    libs/ui/toolbox/KoToolBox.cpp
M  +1    -0    libs/ui/widgets/kis_preset_live_preview_view.cpp
M  +1    -0    libs/widgetutils/KisHighlightedToolButton.h

https://invent.kde.org/graphics/krita/commit/bf30af1b6eb1a4acfe5270dcff57b127c8425201