mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
168 lines
10 KiB
XML
168 lines
10 KiB
XML
<src:BaseWindow x:Class="novideo_srgb.AdvancedWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
mc:Ignorable="d"
|
||
xmlns:local="clr-namespace:novideo_srgb"
|
||
Title="Advanced"
|
||
xmlns:src="clr-namespace:ColorControl.Shared.XForms;assembly=Shared"
|
||
Style="{DynamicResource CustomWindowStyle}"
|
||
ResizeMode="NoResize"
|
||
SizeToContent="WidthAndHeight"
|
||
WindowStartupLocation="CenterOwner">
|
||
<d:Window.DataContext>
|
||
<local:AdvancedViewModel />
|
||
</d:Window.DataContext>
|
||
<Window.Resources>
|
||
<Style x:Key="TextBoxInError" TargetType="{x:Type TextBox}">
|
||
<Style.Triggers>
|
||
<Trigger Property="Validation.HasError" Value="true">
|
||
<Setter Property="ToolTip"
|
||
Value="{Binding RelativeSource={x:Static RelativeSource.Self},
|
||
Path=(Validation.Errors)/ErrorContent}" />
|
||
</Trigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Window.Resources>
|
||
<StackPanel Margin="6,0,6,6">
|
||
<GroupBox Header="Calibration" Padding="6">
|
||
<StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||
<TextBlock VerticalAlignment="Center" Text="Target" />
|
||
<ComboBox SelectedIndex="{Binding Target}" Margin="6,0,0,0">
|
||
<ComboBoxItem>sRGB/BT.709</ComboBoxItem>
|
||
<ComboBoxItem>Display P3</ComboBoxItem>
|
||
<ComboBoxItem>Adobe RGB</ComboBoxItem>
|
||
<ComboBoxItem>BT.2020</ComboBoxItem>
|
||
</ComboBox>
|
||
</StackPanel>
|
||
<RadioButton IsChecked="{Binding UseEdid}" Margin="0,0,0,6">
|
||
<StackPanel IsEnabled="{Binding UseEdid}">
|
||
<TextBlock Text="Use EDID primaries" Margin="0,0,0,0" />
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
<Label HorizontalAlignment="Right" Grid.Row="0" Grid.Column="0">Red </Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.RedX, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="0" Grid.Column="1"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="0" Grid.Column="2">x</Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.RedY, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="0" Grid.Column="3"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="0" Grid.Column="4">y</Label>
|
||
<Label HorizontalAlignment="Right" Grid.Row="1" Grid.Column="0">Green </Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.GreenX, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="1" Grid.Column="1"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="1" Grid.Column="2">x</Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.GreenY, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="1" Grid.Column="3"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="1" Grid.Column="4">y</Label>
|
||
<Label HorizontalAlignment="Right" Grid.Row="2" Grid.Column="0">Blue </Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.BlueX, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="2" Grid.Column="1"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="2" Grid.Column="2">x</Label>
|
||
<TextBox IsEnabled="False"
|
||
Text="{Binding Coords.BlueY, Mode=OneWay, StringFormat={}{0:#,0.000}}"
|
||
IsReadOnly="True"
|
||
Grid.Row="2" Grid.Column="3"
|
||
VerticalAlignment="Center" />
|
||
<Label Grid.Row="2" Grid.Column="4">y</Label>
|
||
</Grid>
|
||
<TextBlock TextWrapping="Wrap" Visibility="{Binding EdidWarning}" Foreground="Red">Primaries match target – cannot clamp</TextBlock>
|
||
<TextBlock TextWrapping="Wrap" Visibility="{Binding HdrWarning}" Foreground="Red">HDR is active – cannot clamp</TextBlock>
|
||
</StackPanel>
|
||
</RadioButton>
|
||
<RadioButton IsChecked="{Binding UseIcc}" HorizontalContentAlignment="Stretch">
|
||
<StackPanel IsEnabled="{Binding UseIcc}">
|
||
<TextBlock Text="Use ICC profile" Margin="0,0,0,6" />
|
||
<Grid Margin="0,0,0, 6">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBox IsEnabled="False" Grid.Column="0" IsReadOnly="True"
|
||
Text="{Binding ProfileName, Mode=OneWay}" />
|
||
<Button Grid.Column="1"
|
||
Content="Browse..."
|
||
Click="Browse_Click"
|
||
Width="75" Margin="6,0,0,0" />
|
||
</Grid>
|
||
<StackPanel Orientation="Horizontal">
|
||
<CheckBox IsChecked="{Binding CalibrateGamma}" VerticalAlignment="Center">Calibrate gamma to</CheckBox>
|
||
<ComboBox IsEnabled="{Binding CalibrateGamma}" SelectedIndex="{Binding SelectedGamma}"
|
||
VerticalAlignment="Center" Margin="6,0,0,0">
|
||
<ComboBoxItem>sRGB</ComboBoxItem>
|
||
<ComboBoxItem>BT.1886</ComboBoxItem>
|
||
<ComboBoxItem>Absolute</ComboBoxItem>
|
||
<ComboBoxItem>Relative</ComboBoxItem>
|
||
</ComboBox>
|
||
<TextBox IsEnabled="{Binding CalibrateGamma}"
|
||
Visibility="{Binding UseCustomGamma, Mode=OneWay}"
|
||
Style="{StaticResource TextBoxInError}"
|
||
VerticalContentAlignment="Center" Width="50" Margin="6,0,0,0">
|
||
<TextBox.Text>
|
||
<Binding Path="CustomGamma"
|
||
UpdateSourceTrigger="PropertyChanged">
|
||
<Binding.ValidationRules>
|
||
<local:RangeRule Min="1" Max="4" />
|
||
</Binding.ValidationRules>
|
||
</Binding>
|
||
</TextBox.Text>
|
||
</TextBox>
|
||
</StackPanel>
|
||
<StackPanel Visibility="{Binding UseCustomGamma}" IsEnabled="{Binding CalibrateGamma}"
|
||
Orientation="Horizontal">
|
||
<TextBlock VerticalAlignment="Center">with</TextBlock>
|
||
<TextBox
|
||
VerticalAlignment="Center" VerticalContentAlignment="Center" TextAlignment="Right"
|
||
Height="22" Width="50" Style="{StaticResource TextBoxInError}" Margin="6,0,0,0">
|
||
<TextBox.Text>
|
||
<Binding Path="CustomPercentage"
|
||
UpdateSourceTrigger="PropertyChanged">
|
||
<Binding.ValidationRules>
|
||
<local:RangeRule Min="0" Max="100" />
|
||
</Binding.ValidationRules>
|
||
</Binding>
|
||
</TextBox.Text>
|
||
</TextBox>
|
||
<TextBlock VerticalAlignment="Center" Margin="2,0,0,0">% black output offset</TextBlock>
|
||
</StackPanel>
|
||
<StackPanel Orientation="Horizontal" Margin="0,2,0,0">
|
||
<CheckBox IsChecked="{Binding DisableOptimization}" VerticalAlignment="Center">Disable 8-bit color optimization</CheckBox>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</RadioButton>
|
||
</StackPanel>
|
||
</GroupBox>
|
||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,6,0,0">
|
||
<Button Width="75" Click="OK_Click" Margin="0,0,6,0" IsDefault="True">OK</Button>
|
||
<Button Width="75" IsCancel="True">Cancel</Button>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</src:BaseWindow> |