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,28 +51,28 @@ struct TimelineCellAppearance: Equatable {
init(theme: VSTheme, showAvatar: Bool, fontSize: FontSize) { init(theme: VSTheme, showAvatar: Bool, fontSize: FontSize) {
let actualFontSize = AppDefaults.actualFontSize(for: 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.cellPadding = theme.edgeInsets(forKey: "MainWindow.Timeline.cell.padding")
self.feedNameColor = theme.color(forKey: "MainWindow.Timeline.cell.feedNameColor") 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") self.dateColor = theme.color(forKey: "MainWindow.Timeline.cell.dateColor")
let actualDateFontSize = AppDefaults.actualFontSize(for: fontSize) self.dateFont = NSFont.systemFont(ofSize: smallItemFontSize)
self.dateFont = NSFont.systemFont(ofSize: actualDateFontSize)
self.dateMarginLeft = theme.float(forKey: "MainWindow.Timeline.cell.dateMarginLeft") self.dateMarginLeft = theme.float(forKey: "MainWindow.Timeline.cell.dateMarginLeft")
self.titleColor = theme.color(forKey: "MainWindow.Timeline.cell.titleColor") self.titleColor = theme.color(forKey: "MainWindow.Timeline.cell.titleColor")
let titleFontSizeMultiplier = theme.float(forKey: "MainWindow.Timeline.cell.titleFontSizeMultiplier") self.titleFont = NSFont.systemFont(ofSize: largeItemFontSize, weight: NSFont.Weight.semibold)
self.titleFont = NSFont.systemFont(ofSize: floor(actualFontSize * titleFontSizeMultiplier), weight: NSFont.Weight.semibold)
self.titleBottomMargin = theme.float(forKey: "MainWindow.Timeline.cell.titleMarginBottom") self.titleBottomMargin = theme.float(forKey: "MainWindow.Timeline.cell.titleMarginBottom")
self.textColor = theme.color(forKey: "MainWindow.Timeline.cell.textColor") 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.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.unreadCircleColor = theme.color(forKey: "MainWindow.Timeline.cell.unreadCircleColor")
self.unreadCircleDimension = theme.float(forKey: "MainWindow.Timeline.cell.unreadCircleDimension") self.unreadCircleDimension = theme.float(forKey: "MainWindow.Timeline.cell.unreadCircleDimension")
self.unreadCircleMarginRight = theme.float(forKey: "MainWindow.Timeline.cell.unreadCircleMarginRight") self.unreadCircleMarginRight = theme.float(forKey: "MainWindow.Timeline.cell.unreadCircleMarginRight")

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: 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> <string>222222</string>
<key>titleColor</key> <key>titleColor</key>
<string>222222</string> <string>222222</string>
<key>titleFontSizeMultiplier</key>
<real>1.1</real>
<key>titleMarginBottom</key> <key>titleMarginBottom</key>
<integer>1</integer> <integer>2</integer>
<key>unreadCircleColor</key> <key>unreadCircleColor</key>
<string>#2db6ff</string> <string>#2db6ff</string>
<key>unreadCircleDimension</key> <key>unreadCircleDimension</key>