SettingsHotkeysView.axaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <UserControl
  2. x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsHotkeysView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  8. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  9. xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
  10. mc:Ignorable="d"
  11. x:CompileBindings="True"
  12. x:DataType="viewModels:SettingsViewModel"
  13. Focusable="True">
  14. <Design.DataContext>
  15. <viewModels:SettingsViewModel />
  16. </Design.DataContext>
  17. <UserControl.Resources>
  18. <helpers:KeyValueConverter x:Key="Key" />
  19. </UserControl.Resources>
  20. <ScrollViewer
  21. Name="HotkeysPage"
  22. HorizontalAlignment="Stretch"
  23. VerticalAlignment="Stretch"
  24. HorizontalScrollBarVisibility="Disabled"
  25. VerticalScrollBarVisibility="Auto">
  26. <Border Classes="settings">
  27. <StackPanel Margin="10" Orientation="Vertical" Spacing="10">
  28. <TextBlock Classes="h1" Text="{locale:Locale SettingsTabHotkeysHotkeys}" />
  29. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  30. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysToggleVsyncHotkey}" Width="230" />
  31. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  32. <TextBlock
  33. Text="{Binding KeyboardHotkeys.ToggleVsync, Mode=TwoWay, Converter={StaticResource Key}}"
  34. TextAlignment="Center" />
  35. </ToggleButton>
  36. </StackPanel>
  37. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  38. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysScreenshotHotkey}" Width="230" />
  39. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  40. <TextBlock
  41. Text="{Binding KeyboardHotkeys.Screenshot, Mode=TwoWay, Converter={StaticResource Key}}"
  42. TextAlignment="Center" />
  43. </ToggleButton>
  44. </StackPanel>
  45. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  46. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysShowUiHotkey}" Width="230" />
  47. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  48. <TextBlock
  49. Text="{Binding KeyboardHotkeys.ShowUi, Mode=TwoWay, Converter={StaticResource Key}}"
  50. TextAlignment="Center" />
  51. </ToggleButton>
  52. </StackPanel>
  53. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  54. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysPauseHotkey}" Width="230" />
  55. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  56. <TextBlock
  57. Text="{Binding KeyboardHotkeys.Pause, Mode=TwoWay, Converter={StaticResource Key}}"
  58. TextAlignment="Center" />
  59. </ToggleButton>
  60. </StackPanel>
  61. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  62. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysToggleMuteHotkey}" Width="230" />
  63. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  64. <TextBlock
  65. Text="{Binding KeyboardHotkeys.ToggleMute, Mode=TwoWay, Converter={StaticResource Key}}"
  66. TextAlignment="Center" />
  67. </ToggleButton>
  68. </StackPanel>
  69. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  70. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysResScaleUpHotkey}" Width="230" />
  71. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  72. <TextBlock
  73. Text="{Binding KeyboardHotkeys.ResScaleUp, Mode=TwoWay, Converter={StaticResource Key}}"
  74. TextAlignment="Center" />
  75. </ToggleButton>
  76. </StackPanel>
  77. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  78. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysResScaleDownHotkey}" Width="230" />
  79. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  80. <TextBlock
  81. Text="{Binding KeyboardHotkeys.ResScaleDown, Mode=TwoWay, Converter={StaticResource Key}}"
  82. TextAlignment="Center" />
  83. </ToggleButton>
  84. </StackPanel>
  85. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  86. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysVolumeUpHotkey}" Width="230" />
  87. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  88. <TextBlock
  89. Text="{Binding KeyboardHotkeys.VolumeUp, Mode=TwoWay, Converter={StaticResource Key}}"
  90. TextAlignment="Center" />
  91. </ToggleButton>
  92. </StackPanel>
  93. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  94. <TextBlock VerticalAlignment="Center" Text="{locale:Locale SettingsTabHotkeysVolumeDownHotkey}" Width="230" />
  95. <ToggleButton Width="90" Height="27" Checked="Button_Checked" Unchecked="Button_Unchecked">
  96. <TextBlock
  97. Text="{Binding KeyboardHotkeys.VolumeDown, Mode=TwoWay, Converter={StaticResource Key}}"
  98. TextAlignment="Center" />
  99. </ToggleButton>
  100. </StackPanel>
  101. </StackPanel>
  102. </Border>
  103. </ScrollViewer>
  104. </UserControl>