Skip to content

Commit

Permalink
Fix broken dividers layout for widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
ealymbaev committed Nov 20, 2023
1 parent f034d20 commit 21f9ab2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ class ActionSheetWrapperViewController: UIViewController {
contentView.snp.makeConstraints { make in
make.edges.equalTo(view.safeAreaLayoutGuide)
}

contentView.backgroundColor = .clear
}

override public func viewDidDisappear(_ animated: Bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct ListSection<Content: View>: View {

VStack(spacing: 0) {
switch themeListStyle {
case .lawrence, .bordered:
case .lawrence, .bordered, .transparentInline:
ForEach(children) { child in
child

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct ThemeList<Content: View, Item: Hashable>: View {

var body: some View {
switch themeListStyle {
case .lawrence, .bordered:
case .lawrence, .bordered, .transparentInline:
Text("todo")
case .transparent:
List {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ enum ThemeListStyle {
case lawrence
case bordered
case transparent
case transparentInline
}

struct ThemeListStyleModifier: ViewModifier {
Expand All @@ -19,7 +20,7 @@ struct ThemeListStyleModifier: ViewModifier {
content
.clipShape(RoundedRectangle(cornerRadius: .cornerRadius12, style: .continuous))
.overlay(RoundedRectangle(cornerRadius: .cornerRadius12).stroke(Color.themeSteel20, lineWidth: .heightOneDp))
case .transparent:
case .transparent, .transparentInline:
content
}
}
Expand All @@ -32,7 +33,7 @@ struct ThemeListStyleButtonModifier: ViewModifier {
func body(content: Content) -> some View {
switch themeListStyle {
case .lawrence: content.background(isPressed ? Color.themeLawrencePressed : Color.themeLawrence)
case .bordered, .transparent: content.background(isPressed ? Color.themeLawrencePressed : Color.themeTyler)
case .bordered, .transparent, .transparentInline: content.background(isPressed ? Color.themeLawrencePressed : Color.themeTyler)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct CoinPriceListView: View {
Spacer()
}
}
.themeListStyle(.transparent)
.themeListStyle(.transparentInline)
}
.frame(maxHeight: .infinity)
.padding(.vertical, verticalPadding)
Expand Down

0 comments on commit 21f9ab2

Please sign in to comment.