mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-27 06:04:07 +03:00
Remove draw parallel option
This commit is contained in:
parent
1dd5dec2ce
commit
4d76e9b932
@ -19,7 +19,6 @@ final class AttributesRunDrawer {
|
||||
}
|
||||
|
||||
var usesLigatures: Bool
|
||||
var drawsParallel = false
|
||||
|
||||
private(set) var cellSize: CGSize = .zero
|
||||
private(set) var baselineOffset: CGFloat = 0
|
||||
|
@ -83,10 +83,6 @@ public final class NvimView: NSView, NSUserInterfaceValidations, NSTextInputClie
|
||||
didSet { self.markForRenderWholeView() }
|
||||
}
|
||||
|
||||
public var drawsParallel = false {
|
||||
didSet { self.drawer.drawsParallel = self.drawsParallel }
|
||||
}
|
||||
|
||||
public var linespacing: CGFloat {
|
||||
get { self._linespacing }
|
||||
|
||||
|
@ -17,10 +17,6 @@ final class AdvancedPrefReducer: ReducerType {
|
||||
state.mainWindowTemplate.useLiveResize = value
|
||||
state.mainWindows.keys.forEach { state.mainWindows[$0]?.useLiveResize = value }
|
||||
|
||||
case let .setDrawsParallel(value):
|
||||
state.mainWindowTemplate.drawsParallel = value
|
||||
state.mainWindows.keys.forEach { state.mainWindows[$0]?.drawsParallel = value }
|
||||
|
||||
case let .setUseInteractiveZsh(value):
|
||||
state.mainWindowTemplate.useInteractiveZsh = value
|
||||
|
||||
|
@ -14,7 +14,6 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
case setUseInteractiveZsh(Bool)
|
||||
case setUseSnapshotUpdate(Bool)
|
||||
case setUseLiveResize(Bool)
|
||||
case setDrawsParallel(Bool)
|
||||
case setNvimBinary(String)
|
||||
}
|
||||
|
||||
@ -32,7 +31,6 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
self.useInteractiveZsh = state.mainWindowTemplate.useInteractiveZsh
|
||||
self.useSnapshotUpdate = state.useSnapshotUpdate
|
||||
self.useLiveResize = state.mainWindowTemplate.useLiveResize
|
||||
self.drawsParallel = state.mainWindowTemplate.drawsParallel
|
||||
self.nvimBinary = state.mainWindowTemplate.nvimBinary
|
||||
|
||||
super.init(frame: .zero)
|
||||
@ -47,13 +45,11 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
|| self.nvimBinary != state.mainWindowTemplate.nvimBinary
|
||||
|| self.useSnapshotUpdate != state.useSnapshotUpdate
|
||||
|| self.useLiveResize != state.mainWindowTemplate.useLiveResize
|
||||
|| self.drawsParallel != state.mainWindowTemplate.drawsParallel
|
||||
{
|
||||
self.useInteractiveZsh = state.mainWindowTemplate.useInteractiveZsh
|
||||
self.nvimBinary = state.mainWindowTemplate.nvimBinary
|
||||
self.useSnapshotUpdate = state.useSnapshotUpdate
|
||||
self.useLiveResize = state.mainWindowTemplate.useLiveResize
|
||||
self.drawsParallel = state.mainWindowTemplate.drawsParallel
|
||||
|
||||
self.updateViews()
|
||||
}
|
||||
@ -67,13 +63,11 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
private var useInteractiveZsh: Bool
|
||||
private var useSnapshotUpdate: Bool
|
||||
private var useLiveResize: Bool
|
||||
private var drawsParallel: Bool
|
||||
private var nvimBinary: String = ""
|
||||
|
||||
private let useInteractiveZshCheckbox = NSButton(forAutoLayout: ())
|
||||
private let useSnapshotUpdateCheckbox = NSButton(forAutoLayout: ())
|
||||
private let useLiveResizeCheckbox = NSButton(forAutoLayout: ())
|
||||
private let drawsParallelCheckbox = NSButton(forAutoLayout: ())
|
||||
private let nvimBinaryField = NSTextField(forAutoLayout: ())
|
||||
|
||||
@available(*, unavailable)
|
||||
@ -89,7 +83,6 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
self.useSnapshotUpdateCheckbox.boolState = self.useSnapshotUpdate
|
||||
self.useInteractiveZshCheckbox.boolState = self.useInteractiveZsh
|
||||
self.useLiveResizeCheckbox.boolState = self.useLiveResize
|
||||
self.drawsParallelCheckbox.boolState = self.drawsParallel
|
||||
self.nvimBinaryField.stringValue = self.nvimBinary
|
||||
}
|
||||
|
||||
@ -134,19 +127,6 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
If you do, please report them at [GitHub](https://github.com/qvacua/vimr/issues).
|
||||
"""#)
|
||||
|
||||
let drawsParallelBox = self.drawsParallelCheckbox
|
||||
self.configureCheckbox(
|
||||
button: drawsParallelBox,
|
||||
title: "Use Concurrent Rendering",
|
||||
action: #selector(AdvancedPref.drawParallelAction(_:))
|
||||
)
|
||||
|
||||
let drawsParallelInfo = self.infoTextField(markdown: #"""
|
||||
VimR can compute the glyphs concurrently. This may result in faster rendering,\
|
||||
depending on the situation. It will definitely result in higher CPU usage, e.g.\
|
||||
when scrolling very fast.
|
||||
"""#)
|
||||
|
||||
let nvimBinaryTitle = self.titleTextField(title: "NeoVim Binary:")
|
||||
let nvimBinaryField = self.nvimBinaryField
|
||||
|
||||
@ -158,8 +138,6 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
self.addSubview(useInteractiveZshInfo)
|
||||
self.addSubview(useLiveResize)
|
||||
self.addSubview(useLiveResizeInfo)
|
||||
self.addSubview(drawsParallelBox)
|
||||
self.addSubview(drawsParallelInfo)
|
||||
self.addSubview(nvimBinaryTitle)
|
||||
self.addSubview(nvimBinaryField)
|
||||
|
||||
@ -173,13 +151,7 @@ final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
useLiveResizeInfo.autoPinEdge(.top, to: .bottom, of: useLiveResize, withOffset: 5)
|
||||
useLiveResizeInfo.autoPinEdge(.left, to: .left, of: useLiveResize)
|
||||
|
||||
drawsParallelBox.autoPinEdge(.top, to: .bottom, of: useLiveResizeInfo, withOffset: 18)
|
||||
drawsParallelBox.autoPinEdge(.left, to: .left, of: useLiveResize, withOffset: 5)
|
||||
|
||||
drawsParallelInfo.autoPinEdge(.top, to: .bottom, of: drawsParallelBox, withOffset: 5)
|
||||
drawsParallelInfo.autoPinEdge(.left, to: .left, of: drawsParallelBox)
|
||||
|
||||
useSnapshotUpdate.autoPinEdge(.top, to: .bottom, of: drawsParallelInfo, withOffset: 18)
|
||||
useSnapshotUpdate.autoPinEdge(.top, to: .bottom, of: useLiveResizeInfo, withOffset: 18)
|
||||
useSnapshotUpdate.autoPinEdge(.left, to: .left, of: useLiveResize, withOffset: 5)
|
||||
|
||||
useSnapshotUpdateInfo.autoPinEdge(.top, to: .bottom, of: useSnapshotUpdate, withOffset: 5)
|
||||
@ -214,10 +186,6 @@ extension AdvancedPref {
|
||||
self.emit(.setUseLiveResize(sender.boolState))
|
||||
}
|
||||
|
||||
@objc func drawParallelAction(_ sender: NSButton) {
|
||||
self.emit(.setDrawsParallel(sender.boolState))
|
||||
}
|
||||
|
||||
@objc func useInteractiveZshAction(_ sender: NSButton) {
|
||||
self.emit(.setUseInteractiveZsh(sender.boolState))
|
||||
}
|
||||
|
@ -170,7 +170,6 @@ final class MainWindow: NSObject,
|
||||
self.linespacing = state.appearance.linespacing
|
||||
self.characterspacing = state.appearance.characterspacing
|
||||
self.usesLigatures = state.appearance.usesLigatures
|
||||
self.drawsParallel = state.drawsParallel
|
||||
|
||||
self.editorPosition = state.preview.editorPosition
|
||||
self.previewPosition = state.preview.previewPosition
|
||||
@ -209,7 +208,6 @@ final class MainWindow: NSObject,
|
||||
self.addViews(withTopInset: 0)
|
||||
|
||||
self.neoVimView.usesLiveResize = state.useLiveResize
|
||||
self.neoVimView.drawsParallel = self.drawsParallel
|
||||
self.neoVimView.delegate = self
|
||||
self.updateNeoVimAppearance()
|
||||
|
||||
@ -434,11 +432,6 @@ final class MainWindow: NSObject,
|
||||
self.neoVimView.usesLiveResize = state.useLiveResize
|
||||
}
|
||||
|
||||
if self.drawsParallel != state.drawsParallel {
|
||||
self.drawsParallel = state.drawsParallel
|
||||
self.neoVimView.drawsParallel = self.drawsParallel
|
||||
}
|
||||
|
||||
if self.defaultFont != state.appearance.font
|
||||
|| self.linespacing != state.appearance.linespacing
|
||||
|| self.characterspacing != state.appearance.characterspacing
|
||||
|
@ -305,7 +305,6 @@ extension MainWindow {
|
||||
var fileBrowserShowHidden = false
|
||||
|
||||
var useLiveResize = false
|
||||
var drawsParallel = false
|
||||
|
||||
var isTemporarySession = false
|
||||
|
||||
@ -357,7 +356,6 @@ extension MainWindow {
|
||||
case nvimBinary = "nvim-binary"
|
||||
|
||||
case useLiveResize = "use-live-resize"
|
||||
case drawsParallel = "draws-parallel"
|
||||
case isShowHidden = "is-show-hidden"
|
||||
case customMarkdownProcessor = "custom-markdown-processor"
|
||||
|
||||
@ -387,10 +385,6 @@ extension MainWindow {
|
||||
forKey: .useLiveResize,
|
||||
default: State.default.useLiveResize
|
||||
)
|
||||
self.drawsParallel = try container.decode(
|
||||
forKey: .drawsParallel,
|
||||
default: State.default.drawsParallel
|
||||
)
|
||||
if let frameRawValue = try container.decodeIfPresent(String.self, forKey: .frame) {
|
||||
self.frame = NSRectFromString(frameRawValue)
|
||||
} else {
|
||||
@ -464,7 +458,6 @@ extension MainWindow {
|
||||
try container.encode(self.isToolButtonsVisible, forKey: .toolButtonsVisible)
|
||||
try container.encode(NSStringFromRect(self.frame), forKey: .frame)
|
||||
try container.encode(self.useLiveResize, forKey: .useLiveResize)
|
||||
try container.encode(self.drawsParallel, forKey: .drawsParallel)
|
||||
try container.encode(self.customMarkdownProcessor, forKey: .customMarkdownProcessor)
|
||||
try container.encode(self.isLeftOptionMeta, forKey: .isLeftOptionMeta)
|
||||
try container.encode(self.isRightOptionMeta, forKey: .isRightOptionMeta)
|
||||
|
Loading…
Reference in New Issue
Block a user