Don’t show avatars in the timeline (for now). Also: align to the top, and scale down-only (not up). This will allow us to use favicons when a bigger icon isn’t available.

This commit is contained in:
Brent Simmons 2017-11-29 13:10:01 -08:00
parent dd05a24704
commit 229a376a86
2 changed files with 12 additions and 11 deletions

View File

@ -73,7 +73,7 @@ struct TimelineCellAppearance {
self.avatarMarginRight = theme.float(forKey: "MainWindow.Timeline.cell.avatarMarginRight")
self.avatarAdjustmentTop = theme.float(forKey: "MainWindow.Timeline.cell.avatarAdjustmentTop")
self.boxLeftMargin = self.cellPadding.left + self.unreadCircleDimension + self.unreadCircleMarginRight + self.avatarSize.width + self.avatarMarginRight
self.boxLeftMargin = self.cellPadding.left + self.unreadCircleDimension + self.unreadCircleMarginRight //+ self.avatarSize.width + self.avatarMarginRight
}
}

View File

@ -18,8 +18,9 @@ class TimelineTableCellView: NSTableCellView {
let avatarImageView: NSImageView = {
let imageView = NSImageView(frame: NSRect.zero)
imageView.imageScaling = .scaleProportionallyUpOrDown
imageView.imageScaling = .scaleProportionallyDown
imageView.animates = false
imageView.imageAlignment = .alignTop
return imageView
}()
@ -176,15 +177,15 @@ class TimelineTableCellView: NSTableCellView {
private func updateAvatar() {
if let image = cellData.avatar {
if avatarImageView.image !== image {
avatarImageView.image = image
}
avatarImageView.isHidden = false
}
else {
avatarImageView.isHidden = true
}
// if let image = cellData.avatar {
// if avatarImageView.image !== image {
// avatarImageView.image = image
// }
// avatarImageView.isHidden = false
// }
// else {
// avatarImageView.isHidden = true
// }
}
private func updateSubviews() {