mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-23 22:01:49 +03:00
Make use of automatic conversion between CGFloat and Double
This commit is contained in:
parent
b671e0d60b
commit
63f7d65084
@ -49,7 +49,7 @@ public class NvimView: NSView,
|
||||
|
||||
public internal(set) var theme = Theme.default
|
||||
|
||||
public var trackpadScrollResistance = 5.cgf
|
||||
public var trackpadScrollResistance = 5.0
|
||||
|
||||
public var usesLiveResize = false
|
||||
|
||||
@ -251,7 +251,7 @@ public class NvimView: NSView,
|
||||
let ugrid = UGrid()
|
||||
let cellAttributesCollection = CellAttributesCollection()
|
||||
let drawer: AttributesRunDrawer
|
||||
var baselineOffset = 0.cgf
|
||||
var baselineOffset = 0.0
|
||||
|
||||
/// We store the last marked text because Cocoa's text input system does the following:
|
||||
/// 하 -> hanja popup -> insertText(하) -> attributedSubstring...() -> setMarkedText(下) -> ...
|
||||
@ -269,7 +269,7 @@ public class NvimView: NSView,
|
||||
var scrollGuardCounterY = 5
|
||||
|
||||
var isCurrentlyPinching = false
|
||||
var pinchTargetScale = 1.cgf
|
||||
var pinchTargetScale = 1.0
|
||||
var pinchBitmap: NSBitmapImageRep?
|
||||
|
||||
var currentlyResizing = false
|
||||
|
@ -38,8 +38,8 @@ final class Typesetter {
|
||||
CTRunGetStringIndices(run, .zero, &indices)
|
||||
|
||||
var column = -1
|
||||
var columnPosition = 0.cgf
|
||||
var deltaX = 0.cgf
|
||||
var columnPosition = 0.0
|
||||
var deltaX = 0.0
|
||||
|
||||
positions.withUnsafeMutableBufferPointer { positionsPtr -> Void in
|
||||
for i in 0..<positionsPtr.count {
|
||||
|
@ -185,7 +185,7 @@ extension BuffersList {
|
||||
}
|
||||
|
||||
self.bufferList.tableColumns[0].width = max(
|
||||
self.bufferList.tableColumns[0].width, cellWidth + 10.cgf
|
||||
self.bufferList.tableColumns[0].width, cellWidth + 10.0
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ class FileOutlineView: NSOutlineView,
|
||||
private let treeController = NSTreeController()
|
||||
private let fileMonitor = FileMonitor()
|
||||
|
||||
private var cachedColumnWidth = 20.cgf
|
||||
private var cachedColumnWidth = 20.0
|
||||
private var usesTheme: Bool
|
||||
private var lastFileSystemUpdateMark = Token()
|
||||
private var showsFileIcon: Bool
|
||||
@ -524,5 +524,5 @@ private extension NSTreeNode {
|
||||
var node: Node? { self.representedObject as? Node }
|
||||
}
|
||||
|
||||
private let columnWidthRightPadding = 40.cgf
|
||||
private let triangleImageSize = 18.cgf
|
||||
private let columnWidthRightPadding = 40.0
|
||||
private let triangleImageSize = 18.0
|
||||
|
@ -463,7 +463,7 @@ struct WorkspaceToolState: Codable {
|
||||
}
|
||||
|
||||
var location = WorkspaceBarLocation.left
|
||||
var dimension = 200.cgf
|
||||
var dimension = 200.0
|
||||
var open = false
|
||||
|
||||
init(from decoder: Decoder) throws {
|
||||
|
@ -21,8 +21,8 @@ open class CustomToolBar: NSView {
|
||||
public class InnerToolBar: NSView, NSUserInterfaceValidations {
|
||||
// MARK: - Public
|
||||
|
||||
public static let iconDimension = 16.cgf
|
||||
public static let itemPadding = 4.cgf
|
||||
public static let iconDimension = 16.0
|
||||
public static let itemPadding = 4.0
|
||||
|
||||
public static func configureToStandardIconButton(
|
||||
button: NSButton,
|
||||
@ -114,7 +114,7 @@ public class InnerToolBar: NSView, NSUserInterfaceValidations {
|
||||
}
|
||||
}
|
||||
|
||||
private static let separatorThickness = 1.cgf
|
||||
private static let separatorThickness = 1.0
|
||||
private static let height = InnerToolBar.iconDimension + 2 + 2 + InnerToolBar.separatorThickness
|
||||
|
||||
private let titleField = NSTextField(forAutoLayout: ())
|
||||
|
@ -46,14 +46,14 @@ private class ProxyBar: NSView {
|
||||
}
|
||||
|
||||
class WorkspaceBar: NSView, WorkspaceToolDelegate {
|
||||
private static let separatorThickness = 1.cgf
|
||||
private static let separatorThickness = 1.0
|
||||
|
||||
fileprivate(set) var tools = [WorkspaceTool]()
|
||||
|
||||
private weak var selectedTool: WorkspaceTool?
|
||||
|
||||
private var isMouseDownOngoing = false
|
||||
private var dragIncrement = 1.cgf
|
||||
private var dragIncrement = 1.0
|
||||
|
||||
private var layoutConstraints = [NSLayoutConstraint]()
|
||||
|
||||
@ -66,7 +66,7 @@ class WorkspaceBar: NSView, WorkspaceToolDelegate {
|
||||
|
||||
// MARK: - API
|
||||
|
||||
static let minimumDimension = 50.cgf
|
||||
static let minimumDimension = 50.0
|
||||
|
||||
let location: WorkspaceBarLocation
|
||||
var isButtonVisible = true {
|
||||
@ -591,7 +591,7 @@ extension WorkspaceBar {
|
||||
|
||||
private func resizeRect() -> CGRect {
|
||||
let separatorRect = self.outerSeparatorRect()
|
||||
let clickDimension = 4.cgf
|
||||
let clickDimension = 4.0
|
||||
|
||||
switch self.location {
|
||||
case .top:
|
||||
|
Loading…
Reference in New Issue
Block a user