Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #8497: Scale VPN menu button icon correctly #8506

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bool> {
Binding(
Expand Down Expand Up @@ -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)
Expand Down