Skip to content

Commit

Permalink
make the pointer on the glyph line up correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
EriWong committed Jan 3, 2020
1 parent 38d4cb9 commit b826a09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
<Border x:Name="TracePointer"
Width="16"
Height="18"
Margin="50,50,0,0"
Margin="48,50,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Visibility="Collapsed">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ void GraphingCalculator::OnTracePointChanged(Windows::Foundation::Point newPoint

void CalculatorApp::GraphingCalculator::OnPointerPointChanged(Windows::Foundation::Point newPoint)
{
TracePointer->Margin = Thickness(newPoint.X, newPoint.Y, 0, 0);
// Move the pointer glyph to where it is supposed to be.
// because the glyph is centered and has some spacing, to get the point to properly line up with the glyph, move the x point over 2 px
TracePointer->Margin = Thickness(newPoint.X - 2, newPoint.Y, 0, 0);
}

GraphingCalculatorViewModel ^ GraphingCalculator::ViewModel::get()
Expand Down

0 comments on commit b826a09

Please sign in to comment.