mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-12 09:44:20 +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.avatarMarginRight = theme.float(forKey: "MainWindow.Timeline.cell.avatarMarginRight")
|
||||||
self.avatarAdjustmentTop = theme.float(forKey: "MainWindow.Timeline.cell.avatarAdjustmentTop")
|
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 avatarImageView: NSImageView = {
|
||||||
let imageView = NSImageView(frame: NSRect.zero)
|
let imageView = NSImageView(frame: NSRect.zero)
|
||||||
imageView.imageScaling = .scaleProportionallyUpOrDown
|
imageView.imageScaling = .scaleProportionallyDown
|
||||||
imageView.animates = false
|
imageView.animates = false
|
||||||
|
imageView.imageAlignment = .alignTop
|
||||||
return imageView
|
return imageView
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -176,15 +177,15 @@ class TimelineTableCellView: NSTableCellView {
|
|||||||
|
|
||||||
private func updateAvatar() {
|
private func updateAvatar() {
|
||||||
|
|
||||||
if let image = cellData.avatar {
|
// if let image = cellData.avatar {
|
||||||
if avatarImageView.image !== image {
|
// if avatarImageView.image !== image {
|
||||||
avatarImageView.image = image
|
// avatarImageView.image = image
|
||||||
}
|
// }
|
||||||
avatarImageView.isHidden = false
|
// avatarImageView.isHidden = false
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
avatarImageView.isHidden = true
|
// avatarImageView.isHidden = true
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateSubviews() {
|
private func updateSubviews() {
|
||||||
|
Loading…
Reference in New Issue
Block a user