mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 05:10:25 +08:00
This commit is contained in:
@@ -258,7 +258,7 @@ namespace SourceGit.Views
|
||||
}
|
||||
|
||||
var requiredWidth = allowWrap && requiredHeight > 16.0
|
||||
? availableSize.Width
|
||||
? (double.IsInfinity(availableSize.Width) ? x + 2 : availableSize.Width)
|
||||
: x + 2;
|
||||
InvalidateVisual();
|
||||
return new Size(requiredWidth, requiredHeight);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace SourceGit.Views
|
||||
return new Size(scale * imageSize.Width, scale * imageSize.Height);
|
||||
}
|
||||
|
||||
return availableSize;
|
||||
return new Size(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace SourceGit.Views
|
||||
var right = NewImage;
|
||||
|
||||
if (left == null)
|
||||
return right == null ? availableSize : GetDesiredSize(right.Size, availableSize);
|
||||
return right == null ? new Size(0, 0) : GetDesiredSize(right.Size, availableSize);
|
||||
|
||||
if (right == null)
|
||||
return GetDesiredSize(left.Size, availableSize);
|
||||
@@ -324,7 +324,7 @@ namespace SourceGit.Views
|
||||
var right = NewImage;
|
||||
|
||||
if (left == null)
|
||||
return right == null ? availableSize : GetDesiredSize(right.Size, availableSize);
|
||||
return right == null ? new Size(0, 0) : GetDesiredSize(right.Size, availableSize);
|
||||
|
||||
if (right == null)
|
||||
return GetDesiredSize(left.Size, availableSize);
|
||||
@@ -439,7 +439,7 @@ namespace SourceGit.Views
|
||||
var right = NewImage;
|
||||
|
||||
if (left == null)
|
||||
return right == null ? availableSize : GetDesiredSize(right.Size, availableSize);
|
||||
return right == null ? new Size(0, 0) : GetDesiredSize(right.Size, availableSize);
|
||||
|
||||
if (right == null)
|
||||
return GetDesiredSize(left.Size, availableSize);
|
||||
|
||||
@@ -120,7 +120,8 @@ namespace SourceGit.Views
|
||||
var typeface = new Typeface(FontFamily);
|
||||
var test = new FormattedText("fgl|", CultureInfo.CurrentCulture, FlowDirection.LeftToRight, typeface, FontSize, Brushes.White);
|
||||
var h = Math.Max(18, test.Height);
|
||||
return new Size(availableSize.Width, h);
|
||||
var w = double.IsInfinity(availableSize.Width) ? 0 : availableSize.Width;
|
||||
return new Size(w, h);
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"^On ([^\s]+)\: ")]
|
||||
|
||||
Reference in New Issue
Block a user