diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-07-07 15:36:31 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-07-07 15:36:31 +0300 |
| commit | 56ca81b4616f11001bd9cb6a1bae5a6d0f2dc855 (patch) | |
| tree | 3f7d950a0a2032f3ea4756a33eee601fce0994fe /Software/Visual_Studio/Tango.Touch | |
| parent | bef396de524d16618dc532ac9b797055e3bae883 (diff) | |
| download | Tango-56ca81b4616f11001bd9cb6a1bae5a6d0f2dc855.tar.gz Tango-56ca81b4616f11001bd9cb6a1bae5a6d0f2dc855.zip | |
PPC. Graphics fix.
Related Work Items: #6832, #6833
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs | 9 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs index a5dbb4f3a..3a0d3de9e 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs @@ -57,17 +57,18 @@ namespace Tango.Touch.Controls if (presenter != null) { Point relativePoint = presenter.TransformToAncestor(this).Transform(new Point(0, 0)); + double offset = this.Padding.Left ; double width = presenter.ActualWidth; if (_lastSelectedItem != null && Items.IndexOf(SelectedItem) > Items.IndexOf(_lastSelectedItem)) { DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + width; + aniX2.To = relativePoint.X + width - offset; aniX2.Duration = TimeSpan.FromSeconds(0.2); _line.BeginAnimation(Line.X2Property, aniX2); DoubleAnimation aniX1 = new DoubleAnimation(); - aniX1.To = relativePoint.X; + aniX1.To = relativePoint.X - offset; aniX1.BeginTime = TimeSpan.FromSeconds(0.2); aniX1.Duration = TimeSpan.FromSeconds(0.1); _line.BeginAnimation(Line.X1Property, aniX1); @@ -75,12 +76,12 @@ namespace Tango.Touch.Controls else { DoubleAnimation aniX1 = new DoubleAnimation(); - aniX1.To = relativePoint.X; + aniX1.To = relativePoint.X - offset; aniX1.Duration = TimeSpan.FromSeconds(0.2); _line.BeginAnimation(Line.X1Property, aniX1); DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + width; + aniX2.To = relativePoint.X + width - offset; aniX2.BeginTime = TimeSpan.FromSeconds(0.2); aniX2.Duration = TimeSpan.FromSeconds(0.1); _line.BeginAnimation(Line.X2Property, aniX2); diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml index 7bab0c3db..599dfdf7c 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml @@ -76,8 +76,8 @@ <ControlTemplate TargetType="{x:Type ItemsControl}"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> <StackPanel> - <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> - <Line x:Name="PART_Rectangle" X1="0" X2="0" Y1="0" Y2="0" Margin="0 5 0 0" HorizontalAlignment="Stretch" Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="3"></Line> + <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Stretch"/> + <Line x:Name="PART_Rectangle" X1="0" X2="0" Y1="0" Y2="0" Margin="0 5 0 -3" Stroke="{StaticResource TangoPrimaryAccentBrush}" StrokeThickness="3" HorizontalAlignment="Stretch"></Line> </StackPanel> </Border> </ControlTemplate> |
