1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Surface Editor - Added TextBoxes to the calibration window

This commit is contained in:
Diogo Trindade 2020-12-08 14:43:26 +00:00
parent acd2a72678
commit f3636c6984
2 changed files with 45 additions and 11 deletions

View File

@ -174,6 +174,9 @@ namespace Artemis.Core
} }
} }
/// <summary>
/// Gets or sets the scale of the red color component used for calibration
/// </summary>
public double RedScale public double RedScale
{ {
get => DeviceEntity.RedScale; get => DeviceEntity.RedScale;
@ -184,6 +187,9 @@ namespace Artemis.Core
} }
} }
/// <summary>
/// Gets or sets the scale of the green color component used for calibration
/// </summary>
public double GreenScale public double GreenScale
{ {
get => DeviceEntity.GreenScale; get => DeviceEntity.GreenScale;
@ -194,6 +200,9 @@ namespace Artemis.Core
} }
} }
/// <summary>
/// Gets or sets the scale of the blue color component used for calibration
/// </summary>
public double BlueScale public double BlueScale
{ {
get => DeviceEntity.BlueScale; get => DeviceEntity.BlueScale;

View File

@ -1,4 +1,4 @@
<UserControl x:Class="Artemis.UI.Screens.SurfaceEditor.Dialogs.SurfaceDeviceConfigView" <UserControl x:Class="Artemis.UI.Screens.SurfaceEditor.Dialogs.SurfaceDeviceConfigView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -85,7 +85,10 @@
Use the sliders below to adjust the colors of your device so that it matches your other devices. Use the sliders below to adjust the colors of your device so that it matches your other devices.
</TextBlock> </TextBlock>
<Label Grid.Row="2" Grid.Column="0" Content="R-" VerticalAlignment="Center" /> <Label Grid.Row="2"
Grid.Column="0"
Content="R"
VerticalAlignment="Center" />
<Slider Grid.Row="2" <Slider Grid.Row="2"
Grid.Column="1" Grid.Column="1"
Minimum="0" Minimum="0"
@ -94,9 +97,17 @@
Value="{Binding RedScale, UpdateSourceTrigger=PropertyChanged}" Value="{Binding RedScale, UpdateSourceTrigger=PropertyChanged}"
Margin="10 0" Margin="10 0"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
<Label Grid.Row="2" Grid.Column="2" Content="R+" VerticalAlignment="Center" /> <TextBox Grid.Row="2"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding RedScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
materialDesign:TextFieldAssist.SuffixText="%"
Width="50" />
<Label Grid.Row="3" Grid.Column="0" Content="G-" VerticalAlignment="Center" /> <Label Grid.Row="3"
Grid.Column="0"
Content="G"
VerticalAlignment="Center" />
<Slider Grid.Row="3" <Slider Grid.Row="3"
Grid.Column="1" Grid.Column="1"
Minimum="0" Minimum="0"
@ -105,9 +116,17 @@
Value="{Binding GreenScale, UpdateSourceTrigger=PropertyChanged}" Value="{Binding GreenScale, UpdateSourceTrigger=PropertyChanged}"
Margin="10 0" Margin="10 0"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
<Label Grid.Row="3" Grid.Column="2" Content="G+" VerticalAlignment="Center" /> <TextBox Grid.Row="3"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding GreenScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
materialDesign:TextFieldAssist.SuffixText="%"
Width="50" />
<Label Grid.Row="4" Grid.Column="0" Content="B-" VerticalAlignment="Center" /> <Label Grid.Row="4"
Grid.Column="0"
Content="B"
VerticalAlignment="Center" />
<Slider Grid.Row="4" <Slider Grid.Row="4"
Grid.Column="1" Grid.Column="1"
Minimum="0" Minimum="0"
@ -115,8 +134,14 @@
ValueChanged="{s:Action ApplyScaling}" ValueChanged="{s:Action ApplyScaling}"
Value="{Binding BlueScale, UpdateSourceTrigger=PropertyChanged}" Value="{Binding BlueScale, UpdateSourceTrigger=PropertyChanged}"
Margin="10 0" Margin="10 0"
Ticks="100"
VerticalAlignment="Center" /> VerticalAlignment="Center" />
<Label Grid.Row="4" Grid.Column="2" Content="B+" VerticalAlignment="Center" /> <TextBox Grid.Row="4"
Grid.Column="2"
VerticalAlignment="Center"
Text="{Binding BlueScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
materialDesign:TextFieldAssist.SuffixText="%"
Width="50" />
<Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3"> <Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>