SettingsHotkeysView.axaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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:DataType="viewModels:SettingsViewModel"
  12. x:CompileBindings="True"
  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. <UserControl.Styles>
  21. <Style Selector="StackPanel > StackPanel">
  22. <Setter Property="Margin" Value="10, 0, 0, 0" />
  23. <Setter Property="Orientation" Value="Horizontal" />
  24. </Style>
  25. <Style Selector="StackPanel > StackPanel > TextBlock">
  26. <Setter Property="VerticalAlignment" Value="Center" />
  27. <Setter Property="Width" Value="230" />
  28. </Style>
  29. <Style Selector="ToggleButton">
  30. <Setter Property="Width" Value="90" />
  31. <Setter Property="Height" Value="27" />
  32. </Style>
  33. <Style Selector="ToggleButton > TextBlock">
  34. <Setter Property="TextAlignment" Value="Center" />
  35. </Style>
  36. </UserControl.Styles>
  37. <ScrollViewer
  38. Name="HotkeysPage"
  39. HorizontalAlignment="Stretch"
  40. VerticalAlignment="Stretch"
  41. HorizontalScrollBarVisibility="Disabled"
  42. VerticalScrollBarVisibility="Auto">
  43. <Border Classes="settings">
  44. <StackPanel
  45. Name="SettingButtons"
  46. Margin="10"
  47. Orientation="Vertical"
  48. Spacing="10">
  49. <TextBlock
  50. Classes="h1"
  51. Text="{locale:Locale SettingsTabHotkeysHotkeys}" />
  52. <StackPanel>
  53. <TextBlock Text="{locale:Locale SettingsTabHotkeysToggleVsyncHotkey}" />
  54. <ToggleButton Name="ToggleVsync">
  55. <TextBlock Text="{Binding KeyboardHotkey.ToggleVsync, Converter={StaticResource Key}}" />
  56. </ToggleButton>
  57. </StackPanel>
  58. <StackPanel>
  59. <TextBlock Text="{locale:Locale SettingsTabHotkeysScreenshotHotkey}" />
  60. <ToggleButton Name="Screenshot">
  61. <TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={StaticResource Key}}" />
  62. </ToggleButton>
  63. </StackPanel>
  64. <StackPanel>
  65. <TextBlock Text="{locale:Locale SettingsTabHotkeysShowUiHotkey}" />
  66. <ToggleButton Name="ShowUI">
  67. <TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={StaticResource Key}}" />
  68. </ToggleButton>
  69. </StackPanel>
  70. <StackPanel>
  71. <TextBlock Text="{locale:Locale SettingsTabHotkeysPauseHotkey}" />
  72. <ToggleButton Name="Pause">
  73. <TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={StaticResource Key}}" />
  74. </ToggleButton>
  75. </StackPanel>
  76. <StackPanel>
  77. <TextBlock Text="{locale:Locale SettingsTabHotkeysToggleMuteHotkey}" />
  78. <ToggleButton Name="ToggleMute">
  79. <TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={StaticResource Key}}" />
  80. </ToggleButton>
  81. </StackPanel>
  82. <StackPanel>
  83. <TextBlock Text="{locale:Locale SettingsTabHotkeysResScaleUpHotkey}" />
  84. <ToggleButton Name="ResScaleUp">
  85. <TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={StaticResource Key}}" />
  86. </ToggleButton>
  87. </StackPanel>
  88. <StackPanel>
  89. <TextBlock Text="{locale:Locale SettingsTabHotkeysResScaleDownHotkey}" />
  90. <ToggleButton Name="ResScaleDown">
  91. <TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={StaticResource Key}}" />
  92. </ToggleButton>
  93. </StackPanel>
  94. <StackPanel>
  95. <TextBlock Text="{locale:Locale SettingsTabHotkeysVolumeUpHotkey}" />
  96. <ToggleButton Name="VolumeUp">
  97. <TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={StaticResource Key}}" />
  98. </ToggleButton>
  99. </StackPanel>
  100. <StackPanel>
  101. <TextBlock Text="{locale:Locale SettingsTabHotkeysVolumeDownHotkey}" />
  102. <ToggleButton Name="VolumeDown">
  103. <TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={StaticResource Key}}" />
  104. </ToggleButton>
  105. </StackPanel>
  106. </StackPanel>
  107. </Border>
  108. </ScrollViewer>
  109. </UserControl>