Thumbnail strip: show hotkey label next to each scene name

This commit is contained in:
2026-08-26 08:28:48 -07:00
parent 3a1484b3c5
commit d4aa5e1003
4 changed files with 44 additions and 3 deletions
+17
View File
@@ -404,6 +404,22 @@ public class MainViewModel : ViewModelBase
// Reload bindings from DB (the dialog already saved them).
_hotkeyBindings = _layoutStore.LoadHotkeyBindings();
HotkeyBindingsChanged?.Invoke(_hotkeyBindings);
RefreshHotkeyLabels();
}
}
private void RefreshHotkeyLabels()
{
foreach (var scene in Scenes)
{
if (SceneCatalog.SceneHotkeys.TryGetValue(scene.Name, out var hid)
&& _hotkeyBindings.TryGetValue(hid, out var chord))
scene.HotkeyLabel = chord.ToDisplayString();
else if (SceneCatalog.SceneHotkeys.TryGetValue(scene.Name, out var defId)
&& GlobalHotkeyManager.Defaults.TryGetValue(defId, out var defChord))
scene.HotkeyLabel = defChord.ToDisplayString();
else
scene.HotkeyLabel = string.Empty;
}
}
@@ -1842,6 +1858,7 @@ public class MainViewModel : ViewModelBase
AddScene(name);
}
HealBackgrounds();
RefreshHotkeyLabels();
foreach (var scene in Scenes)
foreach (var config in scene.Elements.OfType<WebcamSceneConfig>())