Remove DB5 dependency from SidebarCellAppearance.
This commit is contained in:
parent
e16085a949
commit
11945abd9d
|
@ -7,24 +7,18 @@
|
|||
//
|
||||
|
||||
import AppKit
|
||||
import DB5
|
||||
|
||||
struct SidebarCellAppearance: Equatable {
|
||||
|
||||
let imageSize: CGSize
|
||||
let imageMarginRight: CGFloat
|
||||
let unreadCountMarginLeft: CGFloat
|
||||
let imageSize = CGSize(width: 16, height: 16)
|
||||
let imageMarginRight: CGFloat = 4.0
|
||||
let unreadCountMarginLeft: CGFloat = 10.0
|
||||
let textFieldFontSize: CGFloat
|
||||
let textFieldFont: NSFont
|
||||
|
||||
init(theme: VSTheme, fontSize: FontSize) {
|
||||
|
||||
init(fontSize: FontSize) {
|
||||
self.textFieldFontSize = AppDefaults.actualFontSize(for: fontSize)
|
||||
self.textFieldFont = NSFont.systemFont(ofSize: textFieldFontSize)
|
||||
|
||||
self.imageSize = theme.size(forKey: "MainWindow.SourceList.favicon.image")
|
||||
self.imageMarginRight = theme.float(forKey: "MainWindow.SourceList.favicon.marginRight")
|
||||
self.unreadCountMarginLeft = theme.float(forKey: "MainWindow.SourceList.unreadCount.marginLeft")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ protocol SidebarDelegate: class {
|
|||
|
||||
override func viewDidLoad() {
|
||||
|
||||
sidebarCellAppearance = SidebarCellAppearance(theme: appDelegate.currentTheme, fontSize: AppDefaults.sidebarFontSize)
|
||||
sidebarCellAppearance = SidebarCellAppearance(fontSize: AppDefaults.sidebarFontSize)
|
||||
|
||||
outlineView.dataSource = dataSource
|
||||
outlineView.setDraggingSourceOperationMask(.move, forLocal: true)
|
||||
|
|
Loading…
Reference in New Issue