rewrite details in property inspector. make system sounds the default fallback behavior

This commit is contained in:
dlprows 2023-08-20 21:19:33 -06:00
parent b4f4bea0fc
commit 65ad532adb
4 changed files with 16 additions and 20 deletions

View File

@ -16,14 +16,13 @@ public class DialAction : EncoderBase
{ {
private class PluginSettings private class PluginSettings
{ {
[JsonProperty("fallbackBehavior")]
[JsonProperty("onVolumeNotFound")]
public FallbackBehavior FallbackBehavior { get; set; } public FallbackBehavior FallbackBehavior { get; set; }
public static PluginSettings CreateDefaultSettings() public static PluginSettings CreateDefaultSettings()
{ {
PluginSettings instance = new PluginSettings(); PluginSettings instance = new PluginSettings();
instance.FallbackBehavior = FallbackBehavior.PreviousApp; instance.FallbackBehavior = FallbackBehavior.SystemSounds;
return instance; return instance;
} }
} }

View File

@ -2,7 +2,7 @@
public enum FallbackBehavior public enum FallbackBehavior
{ {
PreviousApp,
SystemSounds, SystemSounds,
PreviousApp,
SystemVolume SystemVolume
} }

View File

@ -12,23 +12,20 @@
<body> <body>
<div class="sdpi-wrapper"> <div class="sdpi-wrapper">
<div class="sdpi-item"> <div class="sdpi-item">
<div class="sdpi-item-label">Fallback Behavior</div> <div class="sdpi-item-label">Fallback</div>
<select class="sdpi-item-value sdProperty" id="fallbackBehavior" oninput="setSettings()"> <select class="sdpi-item-value sdProperty" id="fallbackBehavior" oninput="setSettings()">
<option value="0">Previous App</option> <option value="0">System Sounds</option>
<option value="1">System Sounds</option> <option value="1">Previous App</option>
<option value="2">Main System Volume</option> <option value="2">Main System Volume</option>
</select> </select>
</div> </div>
<div class="sdpi-item"> <details>
<details class="message"> <summary>Fallback Details</summary>
<p>If the focused app does not have a volume control you can pick your desired behavior</p> <p>If you look at windows volume mixer, you will see that not all applications can have their volume controlled. The fallback behavior controls what happens when you are in an application that doesn't show up in the volume mixer</p>
<ul> <p>* System Sounds - Switch to system sounds. This will control windows sound effects such as when an error sound plays. If you're in an application that is making beeping sounds, this will often allow you to control those sounds while leaving things like your music/videos alone</p>
<li>Previous App - the focused app will be the last app that had a volume control</li> <p>* Previous App - Use the last app that had a volume control. This can result in the stream deck not changing after you have quit an application.</p>
<li>System Sounds - switch to control system sounds. For example, if you're using an app that makes a windows "error" sound, its volume is controlled by system sounds. So you can adjust the error sound without impacting other apps</li> <p>* Main System Volume - Switch to the main volume control for the system. This will change the volume of all applications</p>
<li>Main System Volume - switch to the main volume control for the system. This will change the volume of all apps</li> </details>
</ul>
</details>
</div>
</div> </div>
</body> </body>
</html> </html>

View File

@ -18,9 +18,9 @@
"StackColor": "#AABBCC", "StackColor": "#AABBCC",
"TriggerDescription": { "TriggerDescription": {
"Rotate": "Change the volume", "Rotate": "Change the volume",
"Push": "Mute/UnMute", "Push": "Mute",
"Touch": "Mute/UnMute", "Touch": "Mute",
"LongTouch": "Reset all apps" "LongTouch": "Reset"
} }
}, },
"SupportedInMultiActions": false, "SupportedInMultiActions": false,