Use blue cursor
This commit is contained in:
parent
08f9d18aa3
commit
5881a28110
@ -10,6 +10,7 @@
|
|||||||
33071005A600B8C542D04637 /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071BEC2D76387CC2ACE1BD /* WindowController.swift */; };
|
33071005A600B8C542D04637 /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071BEC2D76387CC2ACE1BD /* WindowController.swift */; };
|
||||||
330711A70F03BFB84FB889AB /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071648B80C4188CAC44CA1 /* Constants.swift */; };
|
330711A70F03BFB84FB889AB /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071648B80C4188CAC44CA1 /* Constants.swift */; };
|
||||||
33071853C7159177EC75175B /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 330715DBB45C2BB18057D4BC /* Document.swift */; };
|
33071853C7159177EC75175B /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 330715DBB45C2BB18057D4BC /* Document.swift */; };
|
||||||
|
33071A66CAF656DB9C22D191 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071D0D4955060F4888D328 /* TextField.swift */; };
|
||||||
33071D332D5799D36FBC1DDD /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3307150C0D2CA1C8A71C5E26 /* Preferences.swift */; };
|
33071D332D5799D36FBC1DDD /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3307150C0D2CA1C8A71C5E26 /* Preferences.swift */; };
|
||||||
C98EE9AC1F29532F002F646E /* writeas in Resources */ = {isa = PBXBuildFile; fileRef = C98EE9AB1F29532F002F646E /* writeas */; };
|
C98EE9AC1F29532F002F646E /* writeas in Resources */ = {isa = PBXBuildFile; fileRef = C98EE9AB1F29532F002F646E /* writeas */; };
|
||||||
C9953E801F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C9953E7C1F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf */; };
|
C9953E801F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C9953E7C1F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf */; };
|
||||||
@ -26,6 +27,7 @@
|
|||||||
330715DBB45C2BB18057D4BC /* Document.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Document.swift; path = writeas/Document.swift; sourceTree = "<group>"; };
|
330715DBB45C2BB18057D4BC /* Document.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Document.swift; path = writeas/Document.swift; sourceTree = "<group>"; };
|
||||||
33071648B80C4188CAC44CA1 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
33071648B80C4188CAC44CA1 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||||
33071BEC2D76387CC2ACE1BD /* WindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WindowController.swift; path = writeas/WindowController.swift; sourceTree = "<group>"; };
|
33071BEC2D76387CC2ACE1BD /* WindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WindowController.swift; path = writeas/WindowController.swift; sourceTree = "<group>"; };
|
||||||
|
33071D0D4955060F4888D328 /* TextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
|
||||||
C98EE9AB1F29532F002F646E /* writeas */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = writeas; sourceTree = "<group>"; };
|
C98EE9AB1F29532F002F646E /* writeas */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = writeas; sourceTree = "<group>"; };
|
||||||
C9953E7C1F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf"; sourceTree = "<group>"; };
|
C9953E7C1F2D07A7008ED235 /* open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "open-sans-v14-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin_greek-ext_greek-regular.ttf"; sourceTree = "<group>"; };
|
||||||
C9953E841F2D07BF008ED235 /* lora-v10-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin-regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "lora-v10-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin-regular.ttf"; sourceTree = "<group>"; };
|
C9953E841F2D07BF008ED235 /* lora-v10-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin-regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "lora-v10-cyrillic-ext_vietnamese_cyrillic_latin-ext_latin-regular.ttf"; sourceTree = "<group>"; };
|
||||||
@ -89,6 +91,7 @@
|
|||||||
C99B91121C33841F00A91990 /* Main.storyboard */,
|
C99B91121C33841F00A91990 /* Main.storyboard */,
|
||||||
C99B91151C33841F00A91990 /* Info.plist */,
|
C99B91151C33841F00A91990 /* Info.plist */,
|
||||||
33071648B80C4188CAC44CA1 /* Constants.swift */,
|
33071648B80C4188CAC44CA1 /* Constants.swift */,
|
||||||
|
33071D0D4955060F4888D328 /* TextField.swift */,
|
||||||
);
|
);
|
||||||
path = writeas;
|
path = writeas;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -176,6 +179,7 @@
|
|||||||
330711A70F03BFB84FB889AB /* Constants.swift in Sources */,
|
330711A70F03BFB84FB889AB /* Constants.swift in Sources */,
|
||||||
33071853C7159177EC75175B /* Document.swift in Sources */,
|
33071853C7159177EC75175B /* Document.swift in Sources */,
|
||||||
33071005A600B8C542D04637 /* WindowController.swift in Sources */,
|
33071005A600B8C542D04637 /* WindowController.swift in Sources */,
|
||||||
|
33071A66CAF656DB9C22D191 /* TextField.swift in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -439,7 +439,7 @@ DQ
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="339"/>
|
<rect key="frame" x="0.0" y="0.0" width="480" height="339"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textView importsGraphics="NO" richText="NO" selectionGranularity="word" findStyle="bar" incrementalSearchingEnabled="YES" continuousSpellChecking="YES" allowsUndo="YES" smartInsertDelete="YES" id="HxZ-78-tID">
|
<textView importsGraphics="NO" richText="NO" selectionGranularity="word" findStyle="bar" incrementalSearchingEnabled="YES" continuousSpellChecking="YES" allowsUndo="YES" smartInsertDelete="YES" id="HxZ-78-tID" customClass="TextField" customModule="Write_as" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="495" height="339"/>
|
<rect key="frame" x="0.0" y="0.0" width="495" height="339"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
33
writeas/TextField.swift
Normal file
33
writeas/TextField.swift
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// Created by Matt Baer on 8/3/17.
|
||||||
|
// Copyright (c) 2017 A Bunch Tell. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import AppKit
|
||||||
|
|
||||||
|
class TextField: NSTextView {
|
||||||
|
override func becomeFirstResponder() -> Bool {
|
||||||
|
let success = super.becomeFirstResponder()
|
||||||
|
if success {
|
||||||
|
// #5ac4ee
|
||||||
|
self.insertionPointColor = NSColor(red:0.35, green:0.77, blue:0.93, alpha:1.0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return success
|
||||||
|
}
|
||||||
|
|
||||||
|
override func drawInsertionPoint(in rect: NSRect, color: NSColor, turnedOn flag: Bool) {
|
||||||
|
/*
|
||||||
|
if flag {
|
||||||
|
var rect = rect
|
||||||
|
var color = self.insertionPointColor
|
||||||
|
rect.size.width = 2
|
||||||
|
let path = NSBezierPath(rect: rect)
|
||||||
|
path.setClip()
|
||||||
|
path.fill()
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
super.drawInsertionPoint(in: rect, color: color, turnedOn: flag)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user