mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
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:
parent
dd05a24704
commit
229a376a86
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user