|
@@ -23,7 +23,7 @@ namespace Avalonia.Controls.Utils
|
|
|
_borderThickness = borderThickness;
|
|
_borderThickness = borderThickness;
|
|
|
_cornerRadius = cornerRadius;
|
|
_cornerRadius = cornerRadius;
|
|
|
_initialized = true;
|
|
_initialized = true;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (borderThickness.IsUniform && (cornerRadius.IsUniform || _backendSupportsIndividualCorners == true))
|
|
if (borderThickness.IsUniform && (cornerRadius.IsUniform || _backendSupportsIndividualCorners == true))
|
|
|
{
|
|
{
|
|
|
_backgroundGeometryCache = null;
|
|
_backgroundGeometryCache = null;
|
|
@@ -91,7 +91,7 @@ namespace Avalonia.Controls.Utils
|
|
|
Update(finalSize, borderThickness, cornerRadius);
|
|
Update(finalSize, borderThickness, cornerRadius);
|
|
|
RenderCore(context, background, borderBrush, boxShadows);
|
|
RenderCore(context, background, borderBrush, boxShadows);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
void RenderCore(DrawingContext context, IBrush background, IBrush borderBrush, BoxShadows boxShadows)
|
|
void RenderCore(DrawingContext context, IBrush background, IBrush borderBrush, BoxShadows boxShadows)
|
|
|
{
|
|
{
|
|
|
if (_useComplexRendering)
|
|
if (_useComplexRendering)
|
|
@@ -101,7 +101,7 @@ namespace Avalonia.Controls.Utils
|
|
|
{
|
|
{
|
|
|
context.DrawGeometry(background, null, backgroundGeometry);
|
|
context.DrawGeometry(background, null, backgroundGeometry);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
var borderGeometry = _borderGeometryCache;
|
|
var borderGeometry = _borderGeometryCache;
|
|
|
if (borderGeometry != null)
|
|
if (borderGeometry != null)
|
|
|
{
|
|
{
|
|
@@ -127,7 +127,7 @@ namespace Avalonia.Controls.Utils
|
|
|
|
|
|
|
|
context.PlatformImpl.DrawRectangle(background, pen, rrect, boxShadows);
|
|
context.PlatformImpl.DrawRectangle(background, pen, rrect, boxShadows);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
private static void CreateGeometry(StreamGeometryContext context, Rect boundRect, BorderGeometryKeypoints keypoints)
|
|
private static void CreateGeometry(StreamGeometryContext context, Rect boundRect, BorderGeometryKeypoints keypoints)
|
|
|
{
|
|
{
|