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