Skip to content

Commit

Permalink
Merge branch 'main' into wasdk/1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe authored Sep 6, 2024
2 parents de5b91e + 52755d7 commit b07478d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile

# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
# See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:8.0

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
Expand Down
7 changes: 4 additions & 3 deletions components/RangeSelector/src/RangeSelector.Input.Drag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private double DragThumb(Thumb? thumb, double min, double max, double nextPos)

Canvas.SetLeft(thumb, nextPos);

if (_toolTipText != null && _toolTip != null && thumb != null)
if (_toolTip != null && thumb != null)
{
var thumbCenter = nextPos + (thumb.Width / 2);
_toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
Expand All @@ -99,15 +99,16 @@ private void Thumb_DragStarted(Thumb thumb)
Canvas.SetZIndex(otherThumb, 0);
_oldValue = RangeStart;

if (_toolTipText != null && _toolTip != null)
if (_toolTip != null)
{
_toolTip.Visibility = Visibility.Visible;
var thumbCenter = _absolutePosition + (thumb.Width / 2);
_toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
var ttWidth = _toolTip.ActualWidth / 2;
Canvas.SetLeft(_toolTip, thumbCenter - ttWidth);

UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd);
if (_toolTipText != null)
UpdateToolTipText(this, _toolTipText, useMin ? RangeStart : RangeEnd);
}

VisualStateManager.GoToState(this, useMin ? MinPressedState : MaxPressedState, true);
Expand Down

0 comments on commit b07478d

Please sign in to comment.