Skip to content

Replace deprecated modifier .cornerRadius #1748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CodeEdit/Features/About/Views/BlurButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ struct BlurButtonStyle: ButtonStyle {
Color.black
}
}
.cornerRadius(6)
.clipShape(RoundedRectangle(cornerRadius: 6))
}
}
2 changes: 1 addition & 1 deletion CodeEdit/Features/CodeEditUI/Views/KeyValueTable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct KeyValueTable<Header: View>: View {
showingModal = false
}
}
.cornerRadius(6)
.clipShape(RoundedRectangle(cornerRadius: 6))
.onAppear(perform: updateTableItems)
}
}
Expand Down
2 changes: 1 addition & 1 deletion CodeEdit/Features/CodeEditUI/Views/PaneTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct PaneTextField<LeadingAccessories: View, TrailingAccessories: View>: View
.overlay(
RoundedRectangle(cornerRadius: 6)
.stroke(isFocused || !text.isEmpty || hasValue ? .tertiary : .quaternary, lineWidth: 1.25)
.cornerRadius(6)
.clipShape(RoundedRectangle(cornerRadius: 6))
.disabled(true)
.edgesIgnoringSafeArea(.all)
)
Expand Down
2 changes: 1 addition & 1 deletion CodeEdit/Features/CodeEditUI/Views/SegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct SegmentedControlItem: View {
.background(
background
)
.cornerRadius(5)
.clipShape(RoundedRectangle(cornerRadius: 5))
.onTapGesture {
action()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct EditorTabCloseButton: View {
)
)
.foregroundColor(isPressingClose ? .primary : .secondary)
.cornerRadius(2)
.clipShape(RoundedRectangle(cornerRadius: 2))
.contentShape(Rectangle())
.gesture(
DragGesture(minimumDistance: 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct AccountsSettingsAccountLink: View {
Image(account.provider.iconName)
.resizable()
.aspectRatio(contentMode: .fill)
.cornerRadius(6)
.clipShape(RoundedRectangle(cornerRadius: 6))
.frame(width: 26, height: 26)
.padding(.top, 2)
.padding(.bottom, 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct AccountsSettingsProviderRow: View {
Image(iconName)
.resizable()
.aspectRatio(contentMode: .fill)
.cornerRadius(6)
.clipShape(RoundedRectangle(cornerRadius: 6))
.frame(width: 28, height: 28)
Text(name)
Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct AccountsSettingsSigninView: View {
Image(provider.iconName)
.resizable()
.aspectRatio(contentMode: .fill)
.cornerRadius(12)
.clipShape(RoundedRectangle(cornerRadius: 12))
.frame(width: 52, height: 52)
.padding(.top, 5)
Text("Sign in to \(provider.name)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct ThemeSettingsColorPreviewColor: View {
var body: some View {
color
.frame(width: 5, height: 5)
.cornerRadius(5)
.clipShape(RoundedRectangle(cornerRadius: 5))
.overlay {
ZStack {
Circle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ struct UtilityAreaFilterTextField: View {
.padding(.horizontal, 5)
.frame(height: 22)
.background(Color(nsColor: isFocused ? .textBackgroundColor : .quaternaryLabelColor))
.cornerRadius(7)
.clipShape(RoundedRectangle(cornerRadius: 7))
.overlay(
RoundedRectangle(cornerRadius: 7)
.stroke(isFocused ? .secondary : .tertiary, lineWidth: 0.75).cornerRadius(7)
.stroke(isFocused ? .secondary : .tertiary, lineWidth: 0.75)
.clipShape(RoundedRectangle(cornerRadius: 7))
)
}

Expand Down
2 changes: 1 addition & 1 deletion CodeEdit/Features/Welcome/Views/WelcomeActionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ struct WelcomeActionButtonStyle: ButtonStyle {
.padding(7)
.frame(height: 36)
.background(Color(.labelColor).opacity(configuration.isPressed ? 0.1 : 0.05))
.cornerRadius(8)
.clipShape(RoundedRectangle(cornerRadius: 8))
}
}
2 changes: 1 addition & 1 deletion CodeEdit/Features/Welcome/Views/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct WelcomeView: View {
Rectangle()
.frame(width: 104, height: 104)
.foregroundColor(.accentColor)
.cornerRadius(24)
.clipShape(RoundedRectangle(cornerRadius: 24))
.blur(radius: 64)
.opacity(0.5)
}
Expand Down