Tweak timeline font sizes a bit.

This commit is contained in:
Brent Simmons 2018-02-18 20:28:31 -08:00
parent 2bc89abc0c
commit 04694cef4c
3 changed files with 11 additions and 13 deletions

View File

@ -51,27 +51,27 @@ struct TimelineCellAppearance: Equatable {
init(theme: VSTheme, showAvatar: Bool, fontSize: FontSize) {
let actualFontSize = AppDefaults.actualFontSize(for: fontSize)
let smallItemFontSize = floor(actualFontSize * 0.95)
let largeItemFontSize = floor(actualFontSize * 1.1)
self.cellPadding = theme.edgeInsets(forKey: "MainWindow.Timeline.cell.padding")
self.feedNameColor = theme.color(forKey: "MainWindow.Timeline.cell.feedNameColor")
self.feedNameFont = NSFont.systemFont(ofSize: actualFontSize)
self.feedNameFont = NSFont.systemFont(ofSize: smallItemFontSize)
self.dateColor = theme.color(forKey: "MainWindow.Timeline.cell.dateColor")
let actualDateFontSize = AppDefaults.actualFontSize(for: fontSize)
self.dateFont = NSFont.systemFont(ofSize: actualDateFontSize)
self.dateFont = NSFont.systemFont(ofSize: smallItemFontSize)
self.dateMarginLeft = theme.float(forKey: "MainWindow.Timeline.cell.dateMarginLeft")
self.titleColor = theme.color(forKey: "MainWindow.Timeline.cell.titleColor")
let titleFontSizeMultiplier = theme.float(forKey: "MainWindow.Timeline.cell.titleFontSizeMultiplier")
self.titleFont = NSFont.systemFont(ofSize: floor(actualFontSize * titleFontSizeMultiplier), weight: NSFont.Weight.semibold)
self.titleFont = NSFont.systemFont(ofSize: largeItemFontSize, weight: NSFont.Weight.semibold)
self.titleBottomMargin = theme.float(forKey: "MainWindow.Timeline.cell.titleMarginBottom")
self.textColor = theme.color(forKey: "MainWindow.Timeline.cell.textColor")
self.textFont = NSFont.systemFont(ofSize: actualFontSize)
self.textFont = NSFont.systemFont(ofSize: largeItemFontSize)
self.textOnlyColor = theme.color(forKey: "MainWindow.Timeline.cell.textOnlyColor")
self.textOnlyFont = self.textFont
self.textOnlyFont = NSFont.systemFont(ofSize: largeItemFontSize)
self.unreadCircleColor = theme.color(forKey: "MainWindow.Timeline.cell.unreadCircleColor")
self.unreadCircleDimension = theme.float(forKey: "MainWindow.Timeline.cell.unreadCircleDimension")

View File

@ -117,6 +117,6 @@ private func attributedTitleString(_ title: String, _ text: String, _ appearance
return NSAttributedString(string: title, attributes: [NSAttributedStringKey.foregroundColor: appearance.titleColor, NSAttributedStringKey.font: appearance.titleFont])
}
return NSAttributedString(string: text, attributes: [NSAttributedStringKey.foregroundColor: appearance.textOnlyColor, NSAttributedStringKey.font: appearance.textFont])
return NSAttributedString(string: text, attributes: [NSAttributedStringKey.foregroundColor: appearance.textOnlyColor, NSAttributedStringKey.font: appearance.textOnlyFont])
}

View File

@ -99,10 +99,8 @@
<string>222222</string>
<key>titleColor</key>
<string>222222</string>
<key>titleFontSizeMultiplier</key>
<real>1.1</real>
<key>titleMarginBottom</key>
<integer>1</integer>
<integer>2</integer>
<key>unreadCircleColor</key>
<string>#2db6ff</string>
<key>unreadCircleDimension</key>