Skip to content

Commit

Permalink
1.2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mochengvia committed Apr 7, 2024
1 parent 7cc3199 commit c617c38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public override object Convert(object[] values, Type targetType, object paramete
var direction = (ProgressDirection)values[5];
var orientation = (Orientation)values[6];


var percent = (value - min) / (max - min);

var rect = new Rect();
Expand All @@ -28,10 +27,10 @@ public override object Convert(object[] values, Type targetType, object paramete
switch (direction)
{
case ProgressDirection.Normal:
rect = new Rect(0, 0, width * percent, height);
rect = new Rect(0, 0, Math.Max(0, width * percent), height);
break;
case ProgressDirection.Inverse:
rect = new Rect(width * (1 - percent), 0, width * percent, height);
rect = new Rect(width * (1 - percent), 0, Math.Max(0, width * percent), height);
break;
}
}
Expand All @@ -40,10 +39,10 @@ public override object Convert(object[] values, Type targetType, object paramete
switch (direction)
{
case ProgressDirection.Normal:
rect = new Rect(0, height * (1 - percent), width, height * percent);
rect = new Rect(0, height * (1 - percent), width, Math.Max(0, height * percent));
break;
case ProgressDirection.Inverse:
rect = new Rect(0, 0, width, height * percent);
rect = new Rect(0, 0, width, Math.Max(0, height * percent));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
ResourceDictionaryLocation.SourceAssembly
)]

[assembly: AssemblyVersion("1.2.1.1")]
[assembly: AssemblyFileVersion("1.2.1.1")]
[assembly: AssemblyVersion("1.2.1.2")]
[assembly: AssemblyFileVersion("1.2.1.2")]

0 comments on commit c617c38

Please sign in to comment.