Skip to content

Commit

Permalink
Avalonia update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Feb 8, 2024
1 parent 4a1fe41 commit 3910e6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PicView.Core/Calculations/ImageSizeCalculationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public static ImageSize GetImageSize(double width,

if (autoFit)
{
maxWidth = stretch ? workAreaWidth : Math.Min(workAreaWidth - padding, width);
maxHeight = stretch ? workAreaHeight : Math.Min(workAreaHeight - padding, height);
maxWidth = stretch ? workAreaWidth - padding : Math.Min(workAreaWidth - padding, width);
maxHeight = stretch ? workAreaHeight - padding : Math.Min(workAreaHeight - padding, height);
}
else
{
Expand Down Expand Up @@ -95,7 +95,7 @@ public static ImageSize GetImageSize(double width,

var xWidth = width * aspectRatio;
var xHeight = height * aspectRatio;
var titleMaxWidth = GetTitleMaxWidth(rotationAngle, width, height, monitorMinWidth, monitorMinHeight,
var titleMaxWidth = GetTitleMaxWidth(rotationAngle, xWidth, xHeight, monitorMinWidth, monitorMinHeight,
monitorWidth, monitorHeight, interfaceSize, autoFit, containerWidth, scrollEnabled);

return new ImageSize(xWidth, xHeight, titleMaxWidth);
Expand Down

0 comments on commit 3910e6a

Please sign in to comment.