In 5.0.0-beta1 (can't currently specify this version in the tracker): SUMMARY Left-clicking or right-clicking the foreground/background color buttons on the top left of the pop-up palette does not visually update the buttons, until hovering off the buttons. STEPS TO REPRODUCE 1. Select red as a foreground color and white as a background color. 2. Open pop-up palette. 3. Right-click the foreground/background color buttons on the top-left. OBSERVED RESULT The buttons continue to show red and white until the cursor hovers off. EXPECTED RESULT The button colors should update as soon as they're clicked. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian sid KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.12.11 (Appimage)
Weird, it does do it immediately for me... System info: Krita Version: 5.0.0-beta1 Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl Hidpi: true Qt Version (compiled): 5.12.11 Version (loaded): 5.12.11 OS Information Build ABI: x86_64-little_endian-lp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: linux Kernel Version: 5.3.7-050307-generic Pretty Productname: Linux Mint 19.3 Product Type: linuxmint Product Version: 19.3 Desktop: X-Cinnamon
Apparently, it only happens when using the new Wide Gamut Selector in the pop-up palette instead of the sRGB Triangle Selector.
Can confirm. ------------------------ diff --git a/libs/ui/kis_popup_palette.cpp b/libs/ui/kis_popup_palette.cpp index 63a46a8281..fee4c44eed 100644 --- a/libs/ui/kis_popup_palette.cpp +++ b/libs/ui/kis_popup_palette.cpp @@ -381,6 +381,7 @@ void KisPopupPalette::slotDisplayConfigurationChanged() void KisPopupPalette::slotExternalFgColorChanged(const KoColor &color) { m_colorSelector->slotSetColor(color); + repaint(); } void KisPopupPalette::slotEmitColorChanged() ------------------------- This fixes the problem, however, it is somewhat of a sledgehammer approach? I suspect the main problem is that the wide gamut color selector doesn't sent out updates when receiving them from external sources to avoid endless updates...
Yeah I would just move the update() from slotEmitColorChanged() to slotExternalFgColorChanged(), and also connect background color updates to update(), because the popup palette is not truly modal, and also a reset may only actually change the background color. So relying on the selector re-emitting the change seems not the best choice here. In any case, avoid repaint(), that forces an immediate async repaint on every call while update() schedules it for the next round of synchronized widget repaints, which is more efficient. Btw. commit b117b85f378f09027385f209a9333a43d3538dcc killed the right-click reset functionality, but I'm not sure we should use right-click or that anyway, because people need to be careful where to close the popup palette, especially when using the canvas rotation feature of it.
Git commit d335b6f7a50dec28f658a2edb26ff60029adfed6 by Mathias Wein. Committed on 03/06/2022 at 13:15. Pushed by mwein into branch 'master'. Update popup palette color labels on external FG/BG color changes KisVisualColorSelector doesn't emit change signals when setting color, and external background color changes were not handled at all. This also fixes updates when swapping foreground/background colors by clicking the labels. M +4 -0 libs/ui/kis_popup_palette.cpp https://invent.kde.org/graphics/krita/commit/d335b6f7a50dec28f658a2edb26ff60029adfed6