mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-02 04:46:44 +01:00
Further tighten up the timeline. Align the top of the avatar with the top of the text.
This commit is contained in:
parent
cb89c1ab7b
commit
a936c34c53
@ -42,7 +42,6 @@ struct TimelineCellAppearance: Equatable {
|
||||
let drawsGrid: Bool
|
||||
|
||||
let avatarSize: NSSize
|
||||
let avatarMarginRight: CGFloat
|
||||
let avatarMarginLeft: CGFloat
|
||||
let avatarAdjustmentTop: CGFloat
|
||||
let avatarCornerRadius: CGFloat
|
||||
@ -87,7 +86,6 @@ struct TimelineCellAppearance: Equatable {
|
||||
self.drawsGrid = theme.bool(forKey: "MainWindow.Timeline.drawsGrid")
|
||||
|
||||
self.avatarSize = theme.size(forKey: "MainWindow.Timeline.cell.avatar")
|
||||
self.avatarMarginRight = theme.float(forKey: "MainWindow.Timeline.cell.avatarMarginRight")
|
||||
self.avatarMarginLeft = theme.float(forKey: "MainWindow.Timeline.cell.avatarMarginLeft")
|
||||
self.avatarAdjustmentTop = theme.float(forKey: "MainWindow.Timeline.cell.avatarAdjustmentTop")
|
||||
self.avatarCornerRadius = theme.float(forKey: "MainWindow.Timeline.cell.avatarCornerRadius")
|
||||
|
@ -205,14 +205,15 @@ private extension TimelineCellLayout {
|
||||
}
|
||||
r.size = appearance.avatarSize
|
||||
r.origin.x = (width - appearance.cellPadding.right) - r.size.width
|
||||
r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||
if height > 0.1 {
|
||||
let bounds = NSRect(x: 0.0, y: 0.0, width: width, height: height)
|
||||
r = RSRectCenteredVerticallyInRect(r, bounds)
|
||||
}
|
||||
else {
|
||||
r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||
}
|
||||
r.origin.y = textBoxRect.origin.y + 4.0
|
||||
// r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||
// if height > 0.1 {
|
||||
// let bounds = NSRect(x: 0.0, y: 0.0, width: width, height: height)
|
||||
// r = RSRectCenteredVerticallyInRect(r, bounds)
|
||||
// }
|
||||
// else {
|
||||
// r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||
// }
|
||||
|
||||
return r
|
||||
}
|
||||
|
@ -76,9 +76,9 @@
|
||||
<key>cell</key>
|
||||
<dict>
|
||||
<key>paddingLeft</key>
|
||||
<integer>20</integer>
|
||||
<integer>18</integer>
|
||||
<key>paddingRight</key>
|
||||
<integer>20</integer>
|
||||
<integer>18</integer>
|
||||
<key>paddingTop</key>
|
||||
<integer>8</integer>
|
||||
<key>paddingBottom</key>
|
||||
@ -111,8 +111,6 @@
|
||||
<integer>48</integer>
|
||||
<key>avatarWidth</key>
|
||||
<integer>48</integer>
|
||||
<key>avatarMarginRight</key>
|
||||
<integer>20</integer>
|
||||
<key>avatarMarginLeft</key>
|
||||
<integer>8</integer>
|
||||
<key>avatarAdjustmentTop</key>
|
||||
|
Loading…
Reference in New Issue
Block a user