style<Launcher>: move hotkeys to about dialog

This commit is contained in:
leo 2021-07-20 20:15:22 +08:00
parent 287e3b3bc8
commit a7a1817ad2
8 changed files with 68 additions and 141 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Windows;
@ -10,6 +11,12 @@ namespace SourceGit.Views {
/// </summary>
public partial class About : Controls.Window {
public class Keymap {
public string Key { get; set; }
public string Desc { get; set; }
public Keymap(string k, string d) { Key = k; Desc = App.Text($"Hotkeys.{d}"); }
}
public About() {
InitializeComponent();
@ -18,6 +25,16 @@ namespace SourceGit.Views {
var dotnetVer = framework.Substring(framework.IndexOf("=") + 1);
version.Text = $"VERSION : v{asm.Version.Major}.{asm.Version.Minor} .NET : {dotnetVer}";
hotkeys.ItemsSource = new List<Keymap>() {
new Keymap("CTRL + T", "NewTab"),
new Keymap("CTRL + W", "CloseTab"),
new Keymap("CTRL + TAB", "NextTab"),
new Keymap("CTRL + [1-9]", "SwitchTo"),
new Keymap("CTRL + F", "Search"),
new Keymap("F5", "Refresh"),
new Keymap("SPACE", "ToggleStage"),
};
}
private void OnRequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) {