[Light Switch] Enter latitude and longitude manually in Sunrise to sunset mode (#43276)

<!-- 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 introduces new UI to allow the users to manually enter their
lat/long.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #42429
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **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:
#[5979](https://github.com/MicrosoftDocs/windows-dev-docs-pr/pull/5979)

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
Jaylyn Barbee
2025-11-11 16:18:18 -05:00
committed by GitHub
parent a0f33c8af1
commit 29688cea0e
14 changed files with 837 additions and 534 deletions

View File

@@ -407,6 +407,71 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
private double _locationPanelLatitude;
private double _locationPanelLongitude;
public double LocationPanelLatitude
{
get => _locationPanelLatitude;
set
{
if (_locationPanelLatitude != value)
{
_locationPanelLatitude = value;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(LocationPanelLightTime));
}
}
}
public double LocationPanelLongitude
{
get => _locationPanelLongitude;
set
{
if (_locationPanelLongitude != value)
{
_locationPanelLongitude = value;
NotifyPropertyChanged();
}
}
}
private int _locationPanelLightTime;
private int _locationPanelDarkTime;
public int LocationPanelLightTimeMinutes
{
get => _locationPanelLightTime;
set
{
if (_locationPanelLightTime != value)
{
_locationPanelLightTime = value;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(LocationPanelLightTime));
}
}
}
public int LocationPanelDarkTimeMinutes
{
get => _locationPanelDarkTime;
set
{
if (_locationPanelDarkTime != value)
{
_locationPanelDarkTime = value;
NotifyPropertyChanged();
NotifyPropertyChanged(nameof(LocationPanelDarkTime));
}
}
}
public TimeSpan LocationPanelLightTime => TimeSpan.FromMinutes(_locationPanelLightTime);
public TimeSpan LocationPanelDarkTime => TimeSpan.FromMinutes(_locationPanelDarkTime);
public HotkeySettings ToggleThemeActivationShortcut
{
get => ModuleSettings.Properties.ToggleThemeHotkey.Value;