SettingsSystemView.axaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <UserControl
  2. x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsSystemView"
  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:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  8. xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
  9. xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
  10. xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
  11. mc:Ignorable="d"
  12. x:DataType="viewModels:SettingsViewModel">
  13. <UserControl.Resources>
  14. <helpers:TimeZoneConverter x:Key="TimeZone" />
  15. </UserControl.Resources>
  16. <Design.DataContext>
  17. <viewModels:SettingsViewModel />
  18. </Design.DataContext>
  19. <ScrollViewer
  20. Name="SystemPage"
  21. HorizontalAlignment="Stretch"
  22. VerticalAlignment="Stretch"
  23. HorizontalScrollBarVisibility="Disabled"
  24. VerticalScrollBarVisibility="Auto">
  25. <Border Classes="settings">
  26. <StackPanel
  27. Margin="10"
  28. HorizontalAlignment="Stretch"
  29. Orientation="Vertical"
  30. Spacing="10">
  31. <TextBlock
  32. Classes="h1"
  33. Text="{ext:Locale SettingsTabSystemCore}" />
  34. <StackPanel
  35. Margin="10,0,0,0"
  36. Orientation="Vertical">
  37. <StackPanel
  38. Margin="0,0,0,10"
  39. Orientation="Horizontal">
  40. <TextBlock
  41. VerticalAlignment="Center"
  42. Text="{ext:Locale SettingsTabSystemSystemRegion}"
  43. Width="250" />
  44. <ComboBox
  45. SelectedIndex="{Binding Region}"
  46. ToolTip.Tip="{ext:Locale RegionTooltip}"
  47. HorizontalContentAlignment="Left"
  48. Width="350">
  49. <ComboBoxItem>
  50. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionJapan}" />
  51. </ComboBoxItem>
  52. <ComboBoxItem>
  53. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionUSA}" />
  54. </ComboBoxItem>
  55. <ComboBoxItem>
  56. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionEurope}" />
  57. </ComboBoxItem>
  58. <ComboBoxItem>
  59. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionAustralia}" />
  60. </ComboBoxItem>
  61. <ComboBoxItem>
  62. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionChina}" />
  63. </ComboBoxItem>
  64. <ComboBoxItem>
  65. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionKorea}" />
  66. </ComboBoxItem>
  67. <ComboBoxItem>
  68. <TextBlock Text="{ext:Locale SettingsTabSystemSystemRegionTaiwan}" />
  69. </ComboBoxItem>
  70. </ComboBox>
  71. </StackPanel>
  72. <StackPanel
  73. Margin="0,0,0,10"
  74. Orientation="Horizontal">
  75. <TextBlock
  76. VerticalAlignment="Center"
  77. Text="{ext:Locale SettingsTabSystemSystemLanguage}"
  78. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  79. Width="250" />
  80. <ComboBox
  81. SelectedIndex="{Binding Language}"
  82. ToolTip.Tip="{ext:Locale LanguageTooltip}"
  83. HorizontalContentAlignment="Left"
  84. Width="350">
  85. <ComboBoxItem>
  86. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageJapanese}" />
  87. </ComboBoxItem>
  88. <ComboBoxItem>
  89. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageAmericanEnglish}" />
  90. </ComboBoxItem>
  91. <ComboBoxItem>
  92. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageFrench}" />
  93. </ComboBoxItem>
  94. <ComboBoxItem>
  95. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageGerman}" />
  96. </ComboBoxItem>
  97. <ComboBoxItem>
  98. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageItalian}" />
  99. </ComboBoxItem>
  100. <ComboBoxItem>
  101. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSpanish}" />
  102. </ComboBoxItem>
  103. <ComboBoxItem>
  104. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageChinese}" />
  105. </ComboBoxItem>
  106. <ComboBoxItem>
  107. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageKorean}" />
  108. </ComboBoxItem>
  109. <ComboBoxItem>
  110. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageDutch}" />
  111. </ComboBoxItem>
  112. <ComboBoxItem>
  113. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguagePortuguese}" />
  114. </ComboBoxItem>
  115. <ComboBoxItem>
  116. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageRussian}" />
  117. </ComboBoxItem>
  118. <ComboBoxItem>
  119. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTaiwanese}" />
  120. </ComboBoxItem>
  121. <ComboBoxItem>
  122. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBritishEnglish}" />
  123. </ComboBoxItem>
  124. <ComboBoxItem>
  125. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageCanadianFrench}" />
  126. </ComboBoxItem>
  127. <ComboBoxItem>
  128. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageLatinAmericanSpanish}" />
  129. </ComboBoxItem>
  130. <ComboBoxItem>
  131. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSimplifiedChinese}" />
  132. </ComboBoxItem>
  133. <ComboBoxItem>
  134. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageTraditionalChinese}" />
  135. </ComboBoxItem>
  136. <ComboBoxItem>
  137. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageBrazilianPortuguese}" />
  138. </ComboBoxItem>
  139. <ComboBoxItem>
  140. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageSwedish}" />
  141. </ComboBoxItem>
  142. <ComboBoxItem>
  143. <TextBlock Text="{ext:Locale SettingsTabSystemSystemLanguageNorwegian}" />
  144. </ComboBoxItem>
  145. </ComboBox>
  146. </StackPanel>
  147. <StackPanel
  148. Margin="0,0,0,10"
  149. Orientation="Horizontal">
  150. <TextBlock
  151. VerticalAlignment="Center"
  152. Text="{ext:Locale SettingsTabSystemSystemTimeZone}"
  153. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  154. Width="250" />
  155. <AutoCompleteBox
  156. Name="TimeZoneBox"
  157. Width="350"
  158. MaxDropDownHeight="500"
  159. FilterMode="Contains"
  160. ItemsSource="{Binding TimeZones}"
  161. SelectionChanged="TimeZoneBox_OnSelectionChanged"
  162. Text="{Binding Path=TimeZone, Mode=OneWay}"
  163. TextChanged="TimeZoneBox_OnTextChanged"
  164. ToolTip.Tip="{ext:Locale TimezoneTooltip}"
  165. ValueMemberBinding="{Binding Mode=OneWay, Converter={StaticResource TimeZone}}" />
  166. </StackPanel>
  167. <StackPanel
  168. Margin="0,0,0,10"
  169. Orientation="Horizontal">
  170. <TextBlock
  171. VerticalAlignment="Center"
  172. Text="{ext:Locale SettingsTabSystemSystemTime}"
  173. ToolTip.Tip="{ext:Locale TimeTooltip}"
  174. Width="250"/>
  175. <DatePicker
  176. VerticalAlignment="Center"
  177. SelectedDate="{Binding CurrentDate}"
  178. ToolTip.Tip="{ext:Locale TimeTooltip}"
  179. Width="350" />
  180. </StackPanel>
  181. <StackPanel
  182. Margin="250,0,0,10"
  183. Orientation="Horizontal">
  184. <TimePicker
  185. VerticalAlignment="Center"
  186. ClockIdentifier="24HourClock"
  187. SelectedTime="{Binding CurrentTime}"
  188. Width="350"
  189. ToolTip.Tip="{ext:Locale TimeTooltip}" />
  190. <Button
  191. Margin="10, 0, 0, 0"
  192. VerticalAlignment="Center"
  193. Click="MatchSystemTime_OnClick"
  194. Background="{DynamicResource SystemAccentColor}"
  195. ToolTip.Tip="{ext:Locale MatchTimeTooltip}">
  196. <TextBlock Text="{ext:Locale SettingsTabSystemSystemTimeMatch}" />
  197. </Button>
  198. </StackPanel>
  199. <Separator />
  200. <StackPanel Margin="0,10,0,10"
  201. Orientation="Horizontal">
  202. <TextBlock
  203. VerticalAlignment="Center"
  204. Text="{ext:Locale SettingsTabSystemVSyncMode}"
  205. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  206. Width="250" />
  207. <ComboBox
  208. IsVisible="{Binding EnableCustomVSyncInterval}"
  209. SelectedIndex="{Binding VSyncMode}"
  210. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltipCustom}"
  211. HorizontalContentAlignment="Left"
  212. Width="350">
  213. <ComboBoxItem>
  214. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  215. </ComboBoxItem>
  216. <ComboBoxItem>
  217. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  218. </ComboBoxItem>
  219. <ComboBoxItem>
  220. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeCustom}" />
  221. </ComboBoxItem>
  222. </ComboBox>
  223. <ComboBox
  224. IsVisible="{Binding !EnableCustomVSyncInterval}"
  225. SelectedIndex="{Binding VSyncMode}"
  226. ToolTip.Tip="{ext:Locale SettingsTabSystemVSyncModeTooltip}"
  227. HorizontalContentAlignment="Left"
  228. Width="350">
  229. <ComboBoxItem>
  230. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeSwitch}" />
  231. </ComboBoxItem>
  232. <ComboBoxItem>
  233. <TextBlock Text="{ext:Locale SettingsTabSystemVSyncModeUnbounded}" />
  234. </ComboBoxItem>
  235. </ComboBox>
  236. </StackPanel>
  237. <StackPanel IsVisible="{Binding EnableCustomVSyncInterval}"
  238. Margin="0,0,0,10"
  239. Orientation="Horizontal">
  240. <TextBlock
  241. VerticalAlignment="Center"
  242. Text="{ext:Locale SettingsTabSystemCustomVSyncIntervalPercentage}"
  243. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalValueTooltip}"
  244. Width="250" />
  245. <Slider Value="{Binding CustomVSyncIntervalPercentageProxy}"
  246. ToolTip.Tip="{ext:Locale SettingsTabSystemCustomVSyncIntervalSliderTooltip}"
  247. MinWidth="175"
  248. Margin="10,-3,0,0"
  249. Height="32"
  250. Padding="0,-5"
  251. TickFrequency="1"
  252. IsSnapToTickEnabled="True"
  253. LargeChange="10"
  254. SmallChange="1"
  255. VerticalAlignment="Center"
  256. Minimum="10"
  257. Maximum="400" />
  258. <TextBlock Margin="5,0"
  259. Width="40"
  260. Text="{Binding CustomVSyncIntervalPercentageText}"/>
  261. </StackPanel>
  262. <CheckBox IsChecked="{Binding EnableFsIntegrityChecks}">
  263. <TextBlock
  264. Text="{ext:Locale SettingsTabSystemEnableFsIntegrityChecks}"
  265. ToolTip.Tip="{ext:Locale FsIntegrityToggleTooltip}" />
  266. </CheckBox>
  267. </StackPanel>
  268. <Separator Height="1" />
  269. <StackPanel
  270. Orientation="Vertical"
  271. Spacing="5">
  272. <TextBlock
  273. Classes="h1"
  274. Text="{ext:Locale SettingsTabSystemHacks}" />
  275. <TextBlock
  276. Foreground="{DynamicResource SecondaryTextColor}"
  277. TextDecorations="Underline"
  278. Text="{ext:Locale SettingsTabSystemHacksNote}" />
  279. </StackPanel>
  280. <StackPanel
  281. Margin="10,0,0,0"
  282. Orientation="Horizontal">
  283. <TextBlock
  284. VerticalAlignment="Center"
  285. Text="{ext:Locale SettingsTabSystemDramSize}"
  286. Width="250" />
  287. <ComboBox
  288. SelectedIndex="{Binding DramSize}"
  289. ToolTip.Tip="{ext:Locale DRamTooltip}"
  290. HorizontalContentAlignment="Left"
  291. Width="350">
  292. <ComboBoxItem>
  293. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize4GiB}" />
  294. </ComboBoxItem>
  295. <ComboBoxItem>
  296. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize6GiB}" />
  297. </ComboBoxItem>
  298. <ComboBoxItem>
  299. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize8GiB}" />
  300. </ComboBoxItem>
  301. <ComboBoxItem>
  302. <TextBlock Text="{ext:Locale SettingsTabSystemDramSize12GiB}" />
  303. </ComboBoxItem>
  304. </ComboBox>
  305. </StackPanel>
  306. <StackPanel
  307. Margin="10,0,0,0"
  308. HorizontalAlignment="Stretch"
  309. Orientation="Vertical">
  310. <CheckBox
  311. IsChecked="{Binding IgnoreMissingServices}"
  312. ToolTip.Tip="{ext:Locale IgnoreMissingServicesTooltip}">
  313. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreMissingServices}" />
  314. </CheckBox>
  315. <CheckBox
  316. IsChecked="{Binding IgnoreApplet}"
  317. ToolTip.Tip="{ext:Locale IgnoreAppletTooltip}">
  318. <TextBlock Text="{ext:Locale SettingsTabSystemIgnoreApplet}" />
  319. </CheckBox>
  320. <CheckBox
  321. IsChecked="{Binding EnableCustomVSyncInterval}"
  322. ToolTip.Tip="{ext:Locale SettingsTabSystemEnableCustomVSyncIntervalTooltip}">
  323. <TextBlock Text="{ext:Locale SettingsTabSystemEnableCustomVSyncInterval}" />
  324. </CheckBox>
  325. </StackPanel>
  326. </StackPanel>
  327. </Border>
  328. </ScrollViewer>
  329. </UserControl>