style: use the larger size of image in diff view if it has two valid bitmaps

This commit is contained in:
leo 2024-03-29 10:02:11 +08:00
parent 871751d7c0
commit 976c8da83c

View file

@ -110,7 +110,17 @@ namespace SourceGit.Views
if (left != null) if (left != null)
{ {
return GetDesiredSize(left.Size, availableSize); var lSize = GetDesiredSize(left.Size, availableSize);
if (right != null)
{
var rSize = GetDesiredSize(right.Size, availableSize);
if (rSize.Width > lSize.Width) return rSize;
return lSize;
}
else
{
return lSize;
}
} }
else if (right != null) else if (right != null)
{ {