Skip to content

Commit

Permalink
Fix barview (#262)
Browse files Browse the repository at this point in the history
* Fix barview

* Go back to non rounded corners
  • Loading branch information
croossin authored Oct 19, 2020
1 parent 5e15976 commit b2d0fb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
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

0 comments on commit b2d0fb3

Please sign in to comment.