diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-05-25 14:01:31 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-05-25 14:01:31 +0300 |
| commit | 9a5dd17b56d9727a03a5311b9488a1fa85e16a25 (patch) | |
| tree | 3caf410305f2c80c8feaa2dee2a528a1891faf91 /Software/Visual_Studio/Tango.Touch | |
| parent | 10eb841cf1535f7bbab097e7cf0a3fd0cf2282fa (diff) | |
| download | Tango-9a5dd17b56d9727a03a5311b9488a1fa85e16a25.tar.gz Tango-9a5dd17b56d9727a03a5311b9488a1fa85e16a25.zip | |
PPC. Display two decimal numbers for Lab and CMYK values
Related Work Items: #6526
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs | 8 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs index 4b494491e..4f8082413 100644 --- a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs +++ b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.cs @@ -76,7 +76,7 @@ namespace Tango.Touch.Controls public void OnMaxPropertyChanged() { if(_colorPickerNumericUpDown != null) - _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 1, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 2, MidpointRounding.AwayFromZero); if(_colorPickerSlider != null) _colorPickerSlider.Maximum = MaxValue; @@ -203,8 +203,8 @@ namespace Tango.Touch.Controls if (_colorPickerNumericUpDown != null) { _colorPickerNumericUpDown.MinValue = MinValue; - _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 1, MidpointRounding.AwayFromZero); - _colorPickerNumericUpDown.Value = Math.Round( ColorValue, 1, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.MaxValue = Math.Round(MaxValue, 2, MidpointRounding.AwayFromZero); + _colorPickerNumericUpDown.Value = Math.Round( ColorValue, 2, MidpointRounding.AwayFromZero); _colorPickerNumericUpDown.ColorNumberChanged += ColorPickerNumber_ValueChanged; } } @@ -222,7 +222,7 @@ namespace Tango.Touch.Controls } public void ColorPickerSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { - var newvalue = Math.Round(e.NewValue, 0, MidpointRounding.AwayFromZero); + var newvalue = Math.Round(e.NewValue, 2, MidpointRounding.AwayFromZero); if (_colorPickerNumericUpDown != null && _colorPickerNumericUpDown.Value != newvalue) { _colorPickerNumericUpDown.SetValueAnotherControl(newvalue); diff --git a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml index 92cc2be65..503b9188a 100644 --- a/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml +++ b/Software/Visual_Studio/Tango.Touch/TouchColorPickerControls/TouchColorPickerControl.xaml @@ -23,7 +23,7 @@ </Grid.ColumnDefinitions> <Grid Grid.Row="0"> <TextBlock FontSize="{StaticResource TangoComboBoxItemFontSize}" TextBlock.Text="{Binding ColorPickerText, RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}}" HorizontalAlignment="Left" Margin="6 0 0 0" FontWeight="SemiBold" VerticalAlignment="Center" /> - <local:TouchNumericUpDownConrol x:Name="PART_ColorPickerNumericUpDown" HorizontalAlignment="Right" BorderThickness="0.8" BorderBrush="{TemplateBinding BorderBrush}" Margin="0 0 5 0" MaxValue="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=MaxValue, StringFormat='0.##'}"/> + <local:TouchNumericUpDownConrol x:Name="PART_ColorPickerNumericUpDown" HorizontalAlignment="Right" BorderThickness="0.8" BorderBrush="{TemplateBinding BorderBrush}" Margin="0 0 5 0" MaxValue="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=MaxValue, StringFormat='0.##'}" NumericPartWidth="68"/> </Grid> <local:TouchColorPickerSlider x:Name="PART_ColorPickerSlider" Grid.Row="1" Margin=" 0 10 0 0" Background="{TemplateBinding Background}" ThumbHeightInside ="{Binding RelativeSource={RelativeSource AncestorType=local:TouchColorPickerControl}, Path=ThumbHeightInside}" |
