From cfcc584174ce346aa2ca4a4f19376ca66f3377de Mon Sep 17 00:00:00 2001 From: KrLite Date: Wed, 18 Dec 2024 21:36:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20background=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Luminare/Components/Auxiliary/LuminareButtonStyles.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Luminare/Components/Auxiliary/LuminareButtonStyles.swift b/Sources/Luminare/Components/Auxiliary/LuminareButtonStyles.swift index 842307a..75101aa 100644 --- a/Sources/Luminare/Components/Auxiliary/LuminareButtonStyles.swift +++ b/Sources/Luminare/Components/Auxiliary/LuminareButtonStyles.swift @@ -389,6 +389,7 @@ public struct LuminareFilled: ViewModifier { public struct LuminareBordered: ViewModifier { @Environment(\.isEnabled) private var isEnabled @Environment(\.luminareIsBordered) private var isBordered + @Environment(\.luminareHasBackground) private var hasBackground @Environment(\.luminareCompactButtonCornerRadii) private var cornerRadii private let isHovering: Bool @@ -437,7 +438,7 @@ public struct LuminareBordered: ViewModifier { content .clipShape(.rect(cornerRadii: cornerRadii)) .background { - if isHovering { + if isHovering, hasBackground { UnevenRoundedRectangle(cornerRadii: cornerRadii) .strokeBorder(fill) } else if isBordered {