Skip to content
Commit 59e30039 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[Night Color KCM] Reset seconds and milliseconds in provided timings

Summary:
When a user tries to set operation mode to "Times", the Apply button
remains enabled after it's been clicked. The reason for that is timings
provided by the kcm include seconds and milliseconds, while timings
sent by KWin don't.

Because seconds and milliseconds are different, CompositorAdapter::
checkStaged() will return false even though hours and minutes haven't
been modified by the user.

In order to address this problem, my patch adjusts the TimeField
component so it provides Date objects with seconds and milliseconds set
to 0. There is another way to fix this issue though. We could check in
CompositorAdaptor::checkStaged() method whether only hours and
minutes have been modified.

Test Plan:
- Set operation mode to "Times"
- Click the Apply button
- Check that the Apply button is disabled

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25047
parent 38ffc13c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment