Bug 458675

Summary: New Day/Night color: Scrolling over the color temperature sliders makes the screen change colors permanently until you click on them.
Product: [Applications] systemsettings Reporter: guimarcalsilva
Component: kcm_nightcolorAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kwin-bugs-null, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.26
Sentry Crash Report:

Description guimarcalsilva 2022-09-03 21:51:40 UTC
SUMMARY

After https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2055 got merged, scrolling over the sliders that set the temperature previews the changes as expected, however, the screen doesn't get changed to normal after the user stops scrolling or even leaves the page. To go back to normal the user needs to click on the sliders. Maybe when the user scrolls over the sliders, it should preview the color only for a set period, like 5 seconds, and then go back to normal.

STEPS TO REPRODUCE
1. Open Night Color KCM
2. Enable the effect
3. Scroll over the color temperature sliders

OBSERVED RESULT

The color preview doesn't leave the screen even after leaving the page and discarding the changes.


EXPECTED RESULT

It should preview the color temperature and then go back to normal.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5
Kernel Version: 5.15.0-46-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × Intel® Core™ i5-9400F CPU @ 2.90GHz
Memory: 7,7 GiB of RAM
Graphics Processor: Radeon RX 570 Series
ADDITIONAL INFORMATION

Neon Unstable with the latest updates as of September 3rd 2022
Comment 1 Nate Graham 2022-09-09 00:11:01 UTC
Can reproduce. Probably changing the color back is done in an onReleased: signal handler, but the released signal never fires when the handle hasn't been dragged.
Comment 2 Nate Graham 2022-09-09 20:57:31 UTC
Yep, the code that hides the preview UI fires in onPressedChanged, which isn't emitted when scrolling.
Comment 3 Bug Janitor Service 2022-09-09 21:30:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2098
Comment 4 Nate Graham 2022-09-10 15:31:00 UTC
Git commit d8be398bd149a69199b001bc3a3e6d6c6dff9b7d by Nate Graham.
Committed on 10/09/2022 at 15:19.
Pushed by ngraham into branch 'master'.

kcms/nightcolor: hide preview message after scroll manipulation

Currently, if you interact with one of the color temperature sliders
by scrolling, the preview message and full-screen color tint are
activated but never deactivated. This is because the deactivation only
happens in an `onPressedChanged` handler, but with a scroll, there is no
change to the `pressed` property's status, so it never fires and hence
the message and overlay never disappear.

This commit fixes that by using a timer to hide them that only triggers
when a slider is manipulated using a scroll.
FIXED-IN: 5.26

M  +40   -10   kcms/nightcolor/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/d8be398bd149a69199b001bc3a3e6d6c6dff9b7d