mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-04 13:59:23 +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 drawsGrid: Bool
|
||||||
|
|
||||||
let avatarSize: NSSize
|
let avatarSize: NSSize
|
||||||
let avatarMarginRight: CGFloat
|
|
||||||
let avatarMarginLeft: CGFloat
|
let avatarMarginLeft: CGFloat
|
||||||
let avatarAdjustmentTop: CGFloat
|
let avatarAdjustmentTop: CGFloat
|
||||||
let avatarCornerRadius: CGFloat
|
let avatarCornerRadius: CGFloat
|
||||||
@ -87,7 +86,6 @@ struct TimelineCellAppearance: Equatable {
|
|||||||
self.drawsGrid = theme.bool(forKey: "MainWindow.Timeline.drawsGrid")
|
self.drawsGrid = theme.bool(forKey: "MainWindow.Timeline.drawsGrid")
|
||||||
|
|
||||||
self.avatarSize = theme.size(forKey: "MainWindow.Timeline.cell.avatar")
|
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.avatarMarginLeft = theme.float(forKey: "MainWindow.Timeline.cell.avatarMarginLeft")
|
||||||
self.avatarAdjustmentTop = theme.float(forKey: "MainWindow.Timeline.cell.avatarAdjustmentTop")
|
self.avatarAdjustmentTop = theme.float(forKey: "MainWindow.Timeline.cell.avatarAdjustmentTop")
|
||||||
self.avatarCornerRadius = theme.float(forKey: "MainWindow.Timeline.cell.avatarCornerRadius")
|
self.avatarCornerRadius = theme.float(forKey: "MainWindow.Timeline.cell.avatarCornerRadius")
|
||||||
|
@ -205,14 +205,15 @@ private extension TimelineCellLayout {
|
|||||||
}
|
}
|
||||||
r.size = appearance.avatarSize
|
r.size = appearance.avatarSize
|
||||||
r.origin.x = (width - appearance.cellPadding.right) - r.size.width
|
r.origin.x = (width - appearance.cellPadding.right) - r.size.width
|
||||||
r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
r.origin.y = textBoxRect.origin.y + 4.0
|
||||||
if height > 0.1 {
|
// r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||||
let bounds = NSRect(x: 0.0, y: 0.0, width: width, height: height)
|
// if height > 0.1 {
|
||||||
r = RSRectCenteredVerticallyInRect(r, bounds)
|
// let bounds = NSRect(x: 0.0, y: 0.0, width: width, height: height)
|
||||||
}
|
// r = RSRectCenteredVerticallyInRect(r, bounds)
|
||||||
else {
|
// }
|
||||||
r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
// else {
|
||||||
}
|
// r = RSRectCenteredVerticallyInRect(r, textBoxRect)
|
||||||
|
// }
|
||||||
|
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
@ -76,9 +76,9 @@
|
|||||||
<key>cell</key>
|
<key>cell</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>paddingLeft</key>
|
<key>paddingLeft</key>
|
||||||
<integer>20</integer>
|
<integer>18</integer>
|
||||||
<key>paddingRight</key>
|
<key>paddingRight</key>
|
||||||
<integer>20</integer>
|
<integer>18</integer>
|
||||||
<key>paddingTop</key>
|
<key>paddingTop</key>
|
||||||
<integer>8</integer>
|
<integer>8</integer>
|
||||||
<key>paddingBottom</key>
|
<key>paddingBottom</key>
|
||||||
@ -111,8 +111,6 @@
|
|||||||
<integer>48</integer>
|
<integer>48</integer>
|
||||||
<key>avatarWidth</key>
|
<key>avatarWidth</key>
|
||||||
<integer>48</integer>
|
<integer>48</integer>
|
||||||
<key>avatarMarginRight</key>
|
|
||||||
<integer>20</integer>
|
|
||||||
<key>avatarMarginLeft</key>
|
<key>avatarMarginLeft</key>
|
||||||
<integer>8</integer>
|
<integer>8</integer>
|
||||||
<key>avatarAdjustmentTop</key>
|
<key>avatarAdjustmentTop</key>
|
||||||
|
Loading…
Reference in New Issue
Block a user