From 06a0f2c2e5f4db7ae6b580bae88454fa78716f17 Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Thu, 30 Nov 2023 13:46:56 -0500 Subject: [PATCH] Fix #8497: Scale VPN menu button icon correctly (#8506) --- .../Browser/Toolbars/BottomToolbar/Menu/VPNMenuButton.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/Menu/VPNMenuButton.swift b/Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/Menu/VPNMenuButton.swift index 21263d3c813..0a6e668ba22 100644 --- a/Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/Menu/VPNMenuButton.swift +++ b/Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/Menu/VPNMenuButton.swift @@ -32,6 +32,8 @@ struct VPNMenuButton: View { @State private var isVPNStatusChanging: Bool = BraveVPN.reconnectPending @State private var isVPNEnabled = BraveVPN.isConnected @State private var isErrorShowing: Bool = false + + @ScaledMetric private var iconSize: CGFloat = 32.0 private var isVPNEnabledBinding: Binding { Binding( @@ -126,7 +128,7 @@ struct VPNMenuButton: View { HStack(spacing: 14) { Image(braveSystemName: retryStateActive ? "leo.warning.triangle-filled" : "leo.product.vpn") .font(.body) - .frame(width: 32, height: 32) + .frame(width: iconSize, height: iconSize) .foregroundColor(retryStateActive ? Color(.braveErrorLabel) : Color(.braveLabel)) .background( RoundedRectangle(cornerRadius: 8, style: .continuous)