mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
always on top accent color borders (#15709)
This commit is contained in:
committed by
GitHub
parent
2ccf492707
commit
2182aabe35
@@ -16,6 +16,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
public const string DefaultFrameColor = "#0099cc";
|
||||
public const bool DefaultSoundEnabled = true;
|
||||
public const bool DefaultDoNotActivateOnGameMode = true;
|
||||
public const bool DefaultFrameAccentColor = true;
|
||||
|
||||
public AlwaysOnTopProperties()
|
||||
{
|
||||
@@ -26,6 +27,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
SoundEnabled = new BoolProperty(DefaultSoundEnabled);
|
||||
DoNotActivateOnGameMode = new BoolProperty(DefaultDoNotActivateOnGameMode);
|
||||
ExcludedApps = new StringProperty();
|
||||
FrameAccentColor = new BoolProperty(DefaultFrameAccentColor);
|
||||
}
|
||||
|
||||
[JsonPropertyName("hotkey")]
|
||||
@@ -49,6 +51,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
[JsonPropertyName("excluded-apps")]
|
||||
public StringProperty ExcludedApps { get; set; }
|
||||
|
||||
[JsonPropertyName("frame-accent-color")]
|
||||
public BoolProperty FrameAccentColor { get; set; }
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
_soundEnabled = Settings.Properties.SoundEnabled.Value;
|
||||
_doNotActivateOnGameMode = Settings.Properties.DoNotActivateOnGameMode.Value;
|
||||
_excludedApps = Settings.Properties.ExcludedApps.Value;
|
||||
_frameAccentColor = Settings.Properties.FrameAccentColor.Value;
|
||||
|
||||
// set the callback functions value to hangle outgoing IPC message.
|
||||
SendConfigMSG = ipcMSGCallBackFunc;
|
||||
@@ -190,6 +191,21 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool FrameAccentColor
|
||||
{
|
||||
get => _frameAccentColor;
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _frameAccentColor)
|
||||
{
|
||||
_frameAccentColor = value;
|
||||
Settings.Properties.FrameAccentColor.Value = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
@@ -204,5 +220,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
private bool _soundEnabled;
|
||||
private bool _doNotActivateOnGameMode;
|
||||
private string _excludedApps;
|
||||
private bool _frameAccentColor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user