mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 07:13:24 +03:00
GH-426 Do only font population in the background
(cherry picked from commit fa0bf52
)
This commit is contained in:
parent
62164fb81b
commit
e2532edc1f
@ -99,7 +99,9 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
fontPopup.action = #selector(AppearancePref.fontPopupAction)
|
||||
|
||||
// This takes approx. 0.8s - 1s on my machine... -_-
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
fontPopup.addItems(withTitles: self.fontManager.availableFontNames(with: .fixedPitchFontMask)!)
|
||||
}
|
||||
|
||||
let sizeCombo = self.sizeCombo
|
||||
sizeCombo.delegate = self
|
||||
|
@ -20,12 +20,7 @@ class UiRoot: UiComponent {
|
||||
|
||||
self.fileMonitor = FileMonitor(source: source, emitter: emitter, state: state)
|
||||
self.openQuicklyWindow = OpenQuicklyWindow(source: source, emitter: emitter, state: state)
|
||||
|
||||
// We dispatch the initialization of the pref window in the background since the population of the font list
|
||||
// in the appearance pref pane takes approx. 0.8s - 1s on my machine... -_-
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
self.prefWindow = PrefWindow(source: source, emitter: emitter, state: state)
|
||||
}
|
||||
|
||||
source
|
||||
.observeOn(MainScheduler.instance)
|
||||
@ -54,7 +49,7 @@ class UiRoot: UiComponent {
|
||||
|
||||
fileprivate let fileMonitor: FileMonitor
|
||||
fileprivate let openQuicklyWindow: OpenQuicklyWindow
|
||||
fileprivate var prefWindow: PrefWindow?
|
||||
fileprivate let prefWindow: PrefWindow
|
||||
|
||||
fileprivate var mainWindows = [String: MainWindow]()
|
||||
fileprivate var subjectForMainWindows = [String: PublishSubject<MainWindow.State>]()
|
||||
|
Loading…
Reference in New Issue
Block a user