SettingsHotkeysView.axaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
  8. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  9. xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
  10. mc:Ignorable="d"
  11. x:DataType="viewModels:SettingsViewModel"
  12. x:CompileBindings="True"
  13. Focusable="True">
  14. <Design.DataContext>
  15. <viewModels:SettingsViewModel />
  16. </Design.DataContext>
  17. <UserControl.Styles>
  18. <Style Selector="StackPanel > StackPanel">
  19. <Setter Property="Margin" Value="10, 0, 0, 0" />
  20. <Setter Property="Orientation" Value="Horizontal" />
  21. </Style>
  22. <Style Selector="StackPanel > StackPanel > TextBlock">
  23. <Setter Property="VerticalAlignment" Value="Center" />
  24. <Setter Property="Width" Value="230" />
  25. </Style>
  26. <Style Selector="ToggleButton">
  27. <Setter Property="Width" Value="90" />
  28. <Setter Property="Height" Value="27" />
  29. </Style>
  30. <Style Selector="ToggleButton > TextBlock">
  31. <Setter Property="TextAlignment" Value="Center" />
  32. </Style>
  33. </UserControl.Styles>
  34. <ScrollViewer
  35. Name="HotkeysPage"
  36. HorizontalAlignment="Stretch"
  37. VerticalAlignment="Stretch"
  38. HorizontalScrollBarVisibility="Disabled"
  39. VerticalScrollBarVisibility="Auto">
  40. <Border Classes="settings">
  41. <StackPanel
  42. Name="SettingButtons"
  43. Margin="10"
  44. Orientation="Vertical"
  45. Spacing="10">
  46. <TextBlock
  47. Classes="h1"
  48. Text="{ext:Locale SettingsTabHotkeysHotkeys}" />
  49. <StackPanel>
  50. <TextBlock Text="{ext:Locale SettingsTabHotkeysToggleVSyncModeHotkey}" />
  51. <ToggleButton Name="ToggleVSyncMode">
  52. <TextBlock Text="{Binding KeyboardHotkey.ToggleVSyncMode, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  53. </ToggleButton>
  54. </StackPanel>
  55. <StackPanel>
  56. <TextBlock Text="{ext:Locale SettingsTabHotkeysScreenshotHotkey}" />
  57. <ToggleButton Name="Screenshot">
  58. <TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  59. </ToggleButton>
  60. </StackPanel>
  61. <StackPanel>
  62. <TextBlock Text="{ext:Locale SettingsTabHotkeysShowUiHotkey}" />
  63. <ToggleButton Name="ShowUI">
  64. <TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  65. </ToggleButton>
  66. </StackPanel>
  67. <StackPanel>
  68. <TextBlock Text="{ext:Locale SettingsTabHotkeysPauseHotkey}" />
  69. <ToggleButton Name="Pause">
  70. <TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  71. </ToggleButton>
  72. </StackPanel>
  73. <StackPanel>
  74. <TextBlock Text="{ext:Locale SettingsTabHotkeysToggleMuteHotkey}" />
  75. <ToggleButton Name="ToggleMute">
  76. <TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  77. </ToggleButton>
  78. </StackPanel>
  79. <StackPanel>
  80. <TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleUpHotkey}" />
  81. <ToggleButton Name="ResScaleUp">
  82. <TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  83. </ToggleButton>
  84. </StackPanel>
  85. <StackPanel>
  86. <TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleDownHotkey}" />
  87. <ToggleButton Name="ResScaleDown">
  88. <TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  89. </ToggleButton>
  90. </StackPanel>
  91. <StackPanel>
  92. <TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeUpHotkey}" />
  93. <ToggleButton Name="VolumeUp">
  94. <TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  95. </ToggleButton>
  96. </StackPanel>
  97. <StackPanel>
  98. <TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeDownHotkey}" />
  99. <ToggleButton Name="VolumeDown">
  100. <TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  101. </ToggleButton>
  102. </StackPanel>
  103. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  104. <TextBlock Text="{ext:Locale SettingsTabHotkeysIncrementCustomVSyncIntervalHotkey}" />
  105. <ToggleButton Name="CustomVSyncIntervalIncrement">
  106. <TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalIncrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  107. </ToggleButton>
  108. </StackPanel>
  109. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  110. <TextBlock Text="{ext:Locale SettingsTabHotkeysDecrementCustomVSyncIntervalHotkey}" />
  111. <ToggleButton Name="CustomVSyncIntervalDecrement">
  112. <TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalDecrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
  113. </ToggleButton>
  114. </StackPanel>
  115. </StackPanel>
  116. </Border>
  117. </ScrollViewer>
  118. </UserControl>