|
163 | 163 |
|
164 | 164 | <TabItem Header="Settings"> |
165 | 165 | <AdornerDecorator> |
166 | | - <GroupBox VerticalAlignment="Top"> |
167 | | - <StackPanel Orientation="Vertical"> |
168 | | - <Grid> |
169 | | - <Grid.Resources> |
170 | | - <Style BasedOn="{StaticResource StyleLabelForm}" TargetType="Label" /> |
171 | | - <Style BasedOn="{StaticResource StyleTextBlockForm}" TargetType="TextBlock" /> |
172 | | - <Style BasedOn="{StaticResource StyleListBoxForm}" TargetType="ListBox" /> |
173 | | - </Grid.Resources> |
174 | | - |
175 | | - <Grid.ColumnDefinitions> |
176 | | - <ColumnDefinition Width="*" /> |
177 | | - <ColumnDefinition Width="8" /> |
178 | | - <ColumnDefinition Width="*" /> |
179 | | - <ColumnDefinition Width="8" /> |
180 | | - <ColumnDefinition Width="*" /> |
181 | | - </Grid.ColumnDefinitions> |
182 | | - |
183 | | - <controls:Form Grid.Column="0"> |
184 | | - <Label controls:Form.IsLabel="True" Content="Version:" /> |
185 | | - <TextBlock Text="{Binding Version}" /> |
186 | | - |
187 | | - <Label controls:Form.IsLabel="True" Content="Update-Rate" /> |
188 | | - <Slider Minimum="1" Maximum="60" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" |
189 | | - Value="{Binding UpdateRate}" |
190 | | - attached:SliderValue.Unit="FPS" |
191 | | - ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering.
Values above 40 will only affect the internal calculations and wont make the keyboard update faster.
It's not recommended to select a value > 40." /> |
192 | | - |
193 | | - <Label controls:Form.IsLabel="True" Content="Fix Volume" /> |
194 | | - <CheckBox VerticalAlignment="Center" |
195 | | - IsChecked="{Binding EnableAudioPrescale}" |
196 | | - ToolTip="Scales the audio signal inverse to the OS-master-volume.
This might (depending on the system) lead to decrased performance
 -> only activate it if you need it." /> |
197 | | - |
198 | | - <Label controls:Form.LineBreaks="1" controls:Form.IsLabel="True" Content="Devices:" /> |
199 | | - </controls:Form> |
200 | | - </Grid> |
201 | | - |
202 | | - <!-- TODO DarthAffe 05.08.2017: Fix the formular to support that use-case --> |
203 | | - <ItemsControl VerticalAlignment="Top" HorizontalAlignment="Left" Margin="120,-22,0,0" ItemsSource="{Binding Source={x:Static core:RGBSurface.Instance}, Path=Devices}"> |
204 | | - <ItemsControl.ItemTemplate> |
205 | | - <DataTemplate> |
206 | | - <TextBlock Style="{StaticResource StyleTextBlockForm}"> |
207 | | - <TextBlock.Text> |
208 | | - <MultiBinding StringFormat="> {0} {1} ({2})"> |
209 | | - <Binding Path="DeviceInfo.Manufacturer" /> |
210 | | - <Binding Path="DeviceInfo.Model" /> |
211 | | - <Binding Path="DeviceInfo.DeviceType" /> |
212 | | - </MultiBinding> |
213 | | - </TextBlock.Text> |
214 | | - </TextBlock> |
215 | | - </DataTemplate> |
216 | | - </ItemsControl.ItemTemplate> |
217 | | - </ItemsControl> |
218 | | - </StackPanel> |
219 | | - </GroupBox> |
| 166 | + <DockPanel LastChildFill="False"> |
| 167 | + <DockPanel.Resources> |
| 168 | + <Style BasedOn="{StaticResource StyleLabelForm}" TargetType="Label" /> |
| 169 | + <Style BasedOn="{StaticResource StyleTextBlockForm}" TargetType="TextBlock" /> |
| 170 | + <Style BasedOn="{StaticResource StyleListBoxForm}" TargetType="ListBox" /> |
| 171 | + </DockPanel.Resources> |
| 172 | + |
| 173 | + <GroupBox DockPanel.Dock="Top"> |
| 174 | + <controls:Form> |
| 175 | + <Label controls:Form.IsLabel="True" Content="Version" /> |
| 176 | + <TextBlock Text="{Binding Version}" /> |
| 177 | + |
| 178 | + <Label controls:Form.IsLabel="True" Content="Update-Rate" /> |
| 179 | + <Slider Minimum="1" Maximum="60" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight" |
| 180 | + Value="{Binding UpdateRate}" |
| 181 | + attached:SliderValue.Unit="FPS" |
| 182 | + ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering.
Values above 40 will only affect the internal calculations and wont make the keyboard update faster.
It's not recommended to select a value > 40." /> |
| 183 | + |
| 184 | + <Label controls:Form.IsLabel="True" Content="Fix Volume" /> |
| 185 | + <CheckBox VerticalAlignment="Center" |
| 186 | + IsChecked="{Binding EnableAudioPrescale}" |
| 187 | + ToolTip="Scales the audio signal inverse to the OS-master-volume.
This might (depending on the system) lead to decrased performance
 -> only activate it if you need it." /> |
| 188 | + |
| 189 | + </controls:Form> |
| 190 | + </GroupBox> |
| 191 | + |
| 192 | + <GroupBox Margin="0,8,0,0" DockPanel.Dock="Top"> |
| 193 | + <StackPanel Orientation="Vertical"> |
| 194 | + <Border HorizontalAlignment="Left" Width="111"> |
| 195 | + <Label HorizontalAlignment="Right" |
| 196 | + Content="Background" /> |
| 197 | + </Border> |
| 198 | + |
| 199 | + <controls:GradientEditor Margin="120,-18,0,0" |
| 200 | + Gradient="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Settings.Background}" |
| 201 | + ToolTip="Defines the gradient used as the background. Use transparency to create some kind of blur. Usage:
 Left click inside the preview to add a new stop.
 Left-click stop to change the color or move it.
 Right-click stop to remove it.
" /> |
| 202 | + </StackPanel> |
| 203 | + </GroupBox> |
| 204 | + |
| 205 | + <GroupBox Margin="0,8,0,0" DockPanel.Dock="Top"> |
| 206 | + <StackPanel Orientation="Vertical"> |
| 207 | + <Border HorizontalAlignment="Left" Width="111"> |
| 208 | + <Label HorizontalAlignment="Right" |
| 209 | + Content="Devices" /> |
| 210 | + </Border> |
| 211 | + |
| 212 | + <ItemsControl VerticalAlignment="Top" HorizontalAlignment="Left" Margin="120,-18,0,0" ItemsSource="{Binding Source={x:Static core:RGBSurface.Instance}, Path=Devices}"> |
| 213 | + <ItemsControl.ItemTemplate> |
| 214 | + <DataTemplate> |
| 215 | + <TextBlock Style="{StaticResource StyleTextBlockForm}"> |
| 216 | + <TextBlock.Text> |
| 217 | + <MultiBinding StringFormat="> {0} {1} ({2})"> |
| 218 | + <Binding Path="DeviceInfo.Manufacturer" /> |
| 219 | + <Binding Path="DeviceInfo.Model" /> |
| 220 | + <Binding Path="DeviceInfo.DeviceType" /> |
| 221 | + </MultiBinding> |
| 222 | + </TextBlock.Text> |
| 223 | + </TextBlock> |
| 224 | + </DataTemplate> |
| 225 | + </ItemsControl.ItemTemplate> |
| 226 | + </ItemsControl> |
| 227 | + </StackPanel> |
| 228 | + </GroupBox> |
| 229 | + </DockPanel> |
220 | 230 | </AdornerDecorator> |
221 | 231 | </TabItem> |
222 | 232 | </TabControl> |
|
0 commit comments