diff --git a/Shared/views/AddMoodHeaderView.swift b/Shared/views/AddMoodHeaderView.swift index 5d3d563..ed8c664 100644 --- a/Shared/views/AddMoodHeaderView.swift +++ b/Shared/views/AddMoodHeaderView.swift @@ -49,7 +49,7 @@ struct AddMoodHeaderView: View { .background( Color(theme.secondaryBGColor) ) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .frame(minHeight: 88, maxHeight: 150) .frame(minWidth: 0, maxWidth: .infinity) } diff --git a/Shared/views/ContentView.swift b/Shared/views/ContentView.swift index 4b8fd01..8011131 100644 --- a/Shared/views/ContentView.swift +++ b/Shared/views/ContentView.swift @@ -307,7 +307,7 @@ struct ContentView: View { } } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() } @@ -331,7 +331,7 @@ struct ContentView: View { .background( Color(theme.secondaryBGColor) ) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() .padding([.top, .bottom], 5) diff --git a/Shared/views/FilterView.swift b/Shared/views/FilterView.swift index ed96242..6746136 100644 --- a/Shared/views/FilterView.swift +++ b/Shared/views/FilterView.swift @@ -49,7 +49,7 @@ struct FilterView: View { statsView .frame(minWidth: 0, maxWidth: .infinity, minHeight: 120, maxHeight: 120) - .cornerRadius(25) + .cornerRadius(10) .padding([.leading, .trailing]) Text(String(localized: "filter_view_total") + ": \(self.viewModel.numberOfRatings)") @@ -81,7 +81,7 @@ struct FilterView: View { .frame(height: 44) .foregroundColor(Color(UIColor.label)) .background(Color(theme.secondaryBGColor)) - .cornerRadius(25) + .cornerRadius(10) }).frame(maxWidth: .infinity) } @@ -112,7 +112,7 @@ struct FilterView: View { } } } - .cornerRadius(25) + .cornerRadius(10) .padding() } @@ -131,7 +131,7 @@ struct FilterView: View { .padding() } .frame(minWidth: 0, maxWidth: .infinity, minHeight: 44, maxHeight: 44) - .cornerRadius(25) + .cornerRadius(10) .padding([.leading, .trailing]) ZStack { @@ -146,7 +146,7 @@ struct FilterView: View { .padding() } .frame(minWidth: 0, maxWidth: .infinity, minHeight: 44, maxHeight: 44) - .cornerRadius(25) + .cornerRadius(10) .padding([.leading, .trailing]) ZStack { @@ -173,7 +173,7 @@ struct FilterView: View { } } .frame(minWidth: 0, maxWidth: .infinity, minHeight: 44, maxHeight: 44) - .cornerRadius(25) + .cornerRadius(10) .padding([ .leading, .trailing]) } filterButon @@ -193,7 +193,7 @@ struct FilterView: View { private var gridView: some View { VStack { monthsHeader - .cornerRadius(25) + .cornerRadius(10) .padding([.leading, .trailing]) VStack { @@ -206,7 +206,7 @@ struct FilterView: View { .background( Color(theme.secondaryBGColor) ) - .cornerRadius(25) + .cornerRadius(10) } } .simultaneousGesture(DragGesture().onChanged({ _ in @@ -235,7 +235,7 @@ struct FilterView: View { } .padding([.leading, .trailing, .top, .bottom]) } - .cornerRadius(25) + .cornerRadius(10) } } diff --git a/Shared/views/GraphView.swift b/Shared/views/GraphView.swift index 1cdfcf3..bf82c6b 100644 --- a/Shared/views/GraphView.swift +++ b/Shared/views/GraphView.swift @@ -27,7 +27,7 @@ struct GraphView: View { BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10))) ]) } - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() ZStack { @@ -40,7 +40,7 @@ struct GraphView: View { BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10))) ]) } - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() } @@ -53,7 +53,8 @@ struct GraphView: View { BarChartDataEntry(x: 4, y: Double(Int.random(in: 0...10))), BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10))) ]) - }.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + } + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() ZStack { @@ -65,7 +66,8 @@ struct GraphView: View { BarChartDataEntry(x: 4, y: Double(Int.random(in: 0...10))), BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10))) ]) - }.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + } + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding() } } diff --git a/Shared/views/SettingsView.swift b/Shared/views/SettingsView.swift index b6b84c0..20300c3 100644 --- a/Shared/views/SettingsView.swift +++ b/Shared/views/SettingsView.swift @@ -95,7 +95,7 @@ struct SettingsView: View { } } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var addTestDataCell: some View { @@ -110,7 +110,7 @@ struct SettingsView: View { .padding() } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var clearDB: some View { @@ -125,7 +125,7 @@ struct SettingsView: View { .padding() } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var whyBackgroundMode: some View { @@ -147,7 +147,7 @@ struct SettingsView: View { } } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } let iconSets: [(String,String)] = [ @@ -189,7 +189,7 @@ struct SettingsView: View { } } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var showOnboardingButton: some View { @@ -203,7 +203,7 @@ struct SettingsView: View { .padding() } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var cloudKitEnable: some View { @@ -221,7 +221,7 @@ struct SettingsView: View { .padding(.bottom) } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var cloudKitStatus: some View { @@ -235,7 +235,7 @@ struct SettingsView: View { .padding() } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var canDelete: some View { @@ -248,7 +248,7 @@ struct SettingsView: View { } } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } private var themePicker: some View { @@ -276,7 +276,7 @@ struct SettingsView: View { .padding() } .fixedSize(horizontal: false, vertical: true) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) } } diff --git a/Shared/views/SwitchableView.swift b/Shared/views/SwitchableView.swift index d0ab5c6..b6c7886 100644 --- a/Shared/views/SwitchableView.swift +++ b/Shared/views/SwitchableView.swift @@ -50,8 +50,8 @@ struct SwitchableView: View { .background( Color(theme.secondaryBGColor) ) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) .contentShape(Rectangle()) + .cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .padding(.bottom, 30) .onTapGesture { currentViewIdx += 1