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

Background colors should default to .clear not .white. #193

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 Source/Bricks/Button/ButtonBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ open class ButtonBrickCell: GenericBrickCell, Bricklike {
self.isHidden = false
self.accessoryView = nil
self.backgroundView = nil
self.backgroundColor = .white
self.backgroundColor = .clear

self.button.isHidden = false
self.button.setImage(nil, for: .normal)
Expand Down
4 changes: 2 additions & 2 deletions Source/Bricks/Label/LabelBrick.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ open class LabelBrickCell: GenericBrickCell, Bricklike {

override open func prepareForReuse() {
super.prepareForReuse()
self.backgroundColor = .white
self.backgroundColor = .clear
self.backgroundView = nil
self.isHidden = false
self.edgeInsets = UIEdgeInsets.zero
Expand All @@ -201,7 +201,7 @@ open class LabelBrickCell: GenericBrickCell, Bricklike {
self.label.numberOfLines = 0
self.label.textColor = .black
self.label.isHidden = false
self.label.backgroundColor = .white
self.label.backgroundColor = .clear

self.horizontalRuleLeft = nil
self.horizontalRuleRight = nil
Expand Down
2 changes: 1 addition & 1 deletion Tests/Bricks/ButtonBrickTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class ButtonBrickTests: XCTestCase {

XCTAssertEqual(cell?.button.titleLabel?.textAlignment, .natural)
XCTAssertEqual(cell?.button.titleLabel?.numberOfLines, 0)
XCTAssertEqual(cell?.backgroundColor, .white)
XCTAssertEqual(cell?.backgroundColor, .clear)
XCTAssertNil(cell?.accessoryView)
XCTAssertNil(cell?.button.titleLabel?.backgroundColor)
XCTAssertNil(cell?.button.titleLabel?.attributedText)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Bricks/LabelBrickTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ class LabelBrickTests: XCTestCase {

XCTAssertEqual(cell?.label.textAlignment, .natural)
XCTAssertEqual(cell?.label.numberOfLines, 0)
XCTAssertEqual(cell?.label.backgroundColor, .white)
XCTAssertEqual(cell?.backgroundColor, .white)
XCTAssertEqual(cell?.label.backgroundColor, .clear)
XCTAssertEqual(cell?.backgroundColor, .clear)
XCTAssertNil(cell?.accessoryView)
XCTAssertNil(cell?.label.attributedText)
XCTAssertNil(cell?.label.text)
Expand Down