-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
SettingsPerformanceView.xaml
216 lines (208 loc) · 12.2 KB
/
SettingsPerformanceView.xaml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<Page
x:Class="Lively.UI.WinUI.Views.Pages.Settings.SettingsPerformanceView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animations="using:CommunityToolkit.WinUI.Animations"
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Lively.UI.WinUI.Views.Pages.Settings"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<ScrollViewer>
<StackPanel Margin="10,25,10,5" Spacing="{StaticResource SettingGroupControlSpacing}">
<!-- Wallpaper Playback -->
<StackPanel>
<TextBlock
x:Uid="WallpaperPlaybackGroup"
Margin="0,0,0,10"
FontWeight="SemiBold" />
<controls:SettingsCard x:Uid="AppFullScreen">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedAppFullScreenIndex, Mode=TwoWay}">
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
<controls:SettingsCard x:Uid="AppFocus">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedAppFocusIndex, Mode=TwoWay}">
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
</StackPanel>
<!-- Laptop Wallpaper Playback -->
<StackPanel>
<TextBlock
x:Uid="LaptopWallpaperPlaybackGroup"
Margin="0,0,0,10"
FontWeight="SemiBold" />
<controls:SettingsCard x:Uid="BatteryPower">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedBatteryPowerIndex, Mode=TwoWay}">
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
<controls:SettingsCard x:Uid="PowerSavingModePower">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedPowerSaveModeIndex, Mode=TwoWay}">
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
</StackPanel>
<!-- System -->
<StackPanel>
<TextBlock
x:Uid="System"
Margin="0,0,0,10"
FontWeight="SemiBold" />
<controls:SettingsCard x:Uid="RemoteDesktopPower">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedRemoteDestopPowerIndex, Mode=TwoWay}">
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
<controls:SettingsCard x:Uid="DisplayPauseRule">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding SelectedDisplayPauseRuleIndex, Mode=TwoWay}">
<ComboBoxItem x:Uid="DisplayPauseRulePerScreen" />
<ComboBoxItem x:Uid="DisplayPauseRuleAllScreen" />
</ComboBox>
</controls:SettingsCard>
<controls:SettingsCard x:Uid="PauseAlgorithm">
<controls:SettingsCard.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsCard.HeaderIcon>
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{Binding SelectedPauseAlgorithmIndex, Mode=TwoWay}">
<ComboBoxItem x:Uid="PauseAlgorithmTypeForegroundProcess" />
<ComboBoxItem x:Uid="PauseAlgorithmTypeAllProcess" Visibility="Collapsed" />
<ComboBoxItem x:Uid="PauseAlgorithmTypeExclusiveMode" />
</ComboBox>
</controls:SettingsCard>
<InfoBar
Title="?"
VerticalAlignment="Top"
IsClosable="False"
IsIconVisible="False"
IsOpen="True"
Severity="Informational">
<InfoBar.ActionButton>
<HyperlinkButton NavigateUri="https://github.com/rocksdanister/lively/wiki/Performance" ToolTipService.ToolTip="https://github.com/rocksdanister/lively/wiki/Performance">
<HyperlinkButton.Content>
<TextBlock x:Uid="TextLearnMore" TextWrapping="Wrap" />
</HyperlinkButton.Content>
</HyperlinkButton>
</InfoBar.ActionButton>
<animations:Implicit.ShowAnimations>
<animations:TranslationAnimation
From="0,-15,0"
To="0"
Duration="0:0:0.4" />
<animations:OpacityAnimation
From="0"
To="1.0"
Duration="0:0:0.6" />
</animations:Implicit.ShowAnimations>
<animations:Implicit.HideAnimations>
<animations:OpacityAnimation
From="1.0"
To="0"
Duration="0:0:0.2" />
<animations:TranslationAnimation
From="0"
To="0,-15,0"
Duration="0:0:0.2" />
</animations:Implicit.HideAnimations>
</InfoBar>
</StackPanel>
<!-- Application -->
<StackPanel>
<TextBlock
x:Uid="Application"
Margin="0,0,0,10"
FontWeight="SemiBold" />
<controls:SettingsExpander x:Uid="AppRules" IsExpanded="False">
<controls:SettingsExpander.HeaderIcon>
<FontIcon Glyph="" />
</controls:SettingsExpander.HeaderIcon>
<controls:SettingsExpander.Items>
<controls:SettingsCard ContentAlignment="Left">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ListView
Grid.Column="0"
MinWidth="500"
MinHeight="200"
MaxHeight="200"
Background="{ThemeResource ControlFillColorDefault}"
CornerRadius="5"
ItemsSource="{Binding AppRules}"
SelectedItem="{Binding SelectedAppRuleItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectionMode="Single">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AppName}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<Button Margin="5" Command="{Binding AddAppRuleCommand}">
<FontIcon FontSize="12" Glyph="" />
</Button>
<Button Margin="5" Command="{Binding RemoveAppRuleCommand}">
<FontIcon FontSize="12" Glyph="" />
</Button>
</StackPanel>
</Grid>
</controls:SettingsCard>
</controls:SettingsExpander.Items>
</controls:SettingsExpander>
</StackPanel>
</StackPanel>
</ScrollViewer>
</Grid>
</Page>