Skip to content
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

Fix barview #262

Merged
merged 2 commits into from
Oct 19, 2020
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

.intuitgithookrc

## Build generated
build/
DerivedData/
Expand Down
9 changes: 2 additions & 7 deletions CardParts/src/Classes/Card Parts/CardPartBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,15 @@ public class CardPartBarView: UIView, CardPartView {
if CardParts.theme.roundedCorners {
if let desiredCornerRadius: CGFloat = cornerRadius {
barLayer.cornerRadius = desiredCornerRadius
backgroundLayer.cornerRadius = desiredCornerRadius
} else {
barLayer.cornerRadius = bounds.height / 2
backgroundLayer.cornerRadius = bounds.height / 2
}
}

let backgroundBounds = CGRect(x: 0, y: 0, width: self.bounds.width , height: desiredHeight)
backgroundLayer.bounds = backgroundBounds
if CardParts.theme.roundedCorners {
if let desiredCornerRadius: CGFloat = cornerRadius {
barLayer.cornerRadius = desiredCornerRadius
} else {
barLayer.cornerRadius = bounds.height / 2
}
}

if CardParts.theme.showTodayLine {
let verticalLineBounds = CGRect(x: 0, y: 0, width: 1.0 , height: self.bounds.height)
Expand Down