mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 23:36:08 +03:00
Make folder bold
This commit is contained in:
parent
27d4972c15
commit
c57744c457
@ -213,6 +213,7 @@ extension ShortcutsPref {
|
||||
}
|
||||
|
||||
cellView.text = item.title
|
||||
cellView.isDir = !item.isLeaf
|
||||
|
||||
return cellView
|
||||
}
|
||||
|
@ -20,8 +20,17 @@ class ShortcutTableRow: NSTableRowView {
|
||||
class ShortcutTableCell: NSTableCellView {
|
||||
|
||||
static let font = NSFont.systemFont(ofSize: 13)
|
||||
static let boldFont = NSFont.boldSystemFont(ofSize: 13)
|
||||
|
||||
var isDir = false
|
||||
var isDir = false {
|
||||
didSet {
|
||||
if self.isDir {
|
||||
self.textField?.font = ShortcutTableCell.boldFont
|
||||
} else {
|
||||
self.textField?.font = ShortcutTableCell.font
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var attributedText: NSAttributedString {
|
||||
get {
|
||||
@ -40,6 +49,11 @@ class ShortcutTableCell: NSTableCellView {
|
||||
}
|
||||
|
||||
set {
|
||||
if self.isDir {
|
||||
self.textField?.font = ShortcutTableCell.boldFont
|
||||
} else {
|
||||
self.textField?.font = ShortcutTableCell.font
|
||||
}
|
||||
self.textField?.stringValue = newValue
|
||||
self.addTextField()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user