From 5ea822e69803f0b33c768107fc9fa5c6feab312a Mon Sep 17 00:00:00 2001 From: Xiang Date: Thu, 8 May 2025 13:32:31 +0800 Subject: [PATCH] Fix the rounded corner issue when the layout is RTL. --- Sources/ColorWellKit/Utilities/Path.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/ColorWellKit/Utilities/Path.swift b/Sources/ColorWellKit/Utilities/Path.swift index 1e9c3b4..86e8c7e 100644 --- a/Sources/ColorWellKit/Utilities/Path.swift +++ b/Sources/ColorWellKit/Utilities/Path.swift @@ -126,7 +126,10 @@ struct Path { ) -> Path { // flatten the opposite edge to join up with the // segment on the other side - let flatEdge = segmentType.edge?.opposite + var flatEdge = segmentType.edge?.opposite + if NSApp.userInterfaceLayoutDirection == .rightToLeft { + flatEdge = segmentType.edge + } return colorWellPath( rect: rect, controlSize: controlSize,