mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR ensures that Light Switch detects changes to app/system theme from Windows Settings. This PR also introduces new behavior where switching the schedule will cause an instant update to the theme if necessary. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #42878 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx
17 lines
463 B
C++
17 lines
463 B
C++
#pragma once
|
|
|
|
#include "SettingsObserver.h"
|
|
|
|
// The LightSwitchServiceObserver reacts when LightSwitchSettings changes.
|
|
class LightSwitchServiceObserver : public SettingsObserver
|
|
{
|
|
public:
|
|
explicit LightSwitchServiceObserver(std::unordered_set<SettingId> observedSettings) :
|
|
SettingsObserver(std::move(observedSettings))
|
|
{
|
|
}
|
|
|
|
void SettingsUpdate(SettingId id) override;
|
|
bool WantsToBeNotified(SettingId id) const noexcept override;
|
|
};
|