Summary: | Foreground/background colors on popup palette don't visually update when clicking them, with wide gamut selector | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | tomtomtomreportingin |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | emmetoneill.pdx, griffinvalley, lynx.mw+kde, tamtamy.tymona |
Priority: | NOR | ||
Version: | 5.0.0-beta1 | ||
Target Milestone: | --- | ||
Platform: | Appimage | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/d335b6f7a50dec28f658a2edb26ff60029adfed6 | Version Fixed In: | |
Sentry Crash Report: |
Description
tomtomtomreportingin
2021-08-19 04:54:24 UTC
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 |