1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 11:35:35 +03:00

Use only solid style FontAwesome icons.

- It seems that CocoaFontAwesome has memory leak when you load solid and
regular style icons. Need to investigate.
This commit is contained in:
Tae Won Ha 2019-03-25 18:39:32 +01:00
parent b5282a89a8
commit d5344ce046
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
5 changed files with 26 additions and 17 deletions

View File

@ -11,16 +11,7 @@ import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
}

View File

@ -18,7 +18,6 @@ class Document: NSDocument, NSWindowDelegate {
override init() {
super.init()
// Add your subclass-specific initialization here.
nvimView
.events
@ -26,10 +25,10 @@ class Document: NSDocument, NSWindowDelegate {
switch event {
case .neoVimStopped:
self.close()
DispatchQueue.main.async { self.close() }
default:
Swift.print("other event: \(event)")
break
}
})

View File

@ -62,6 +62,16 @@
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
<AdditionalOption
key = "MallocStackLogging"
value = ""
isEnabled = "YES">
</AdditionalOption>
<AdditionalOption
key = "PrefersMallocStackLoggingLite"
value = ""
isEnabled = "YES">
</AdditionalOption>
</AdditionalOptions>
</LaunchAction>
<ProfileAction

View File

@ -149,13 +149,22 @@ extension HtmlPreviewTool {
self.addViews()
}
override func repaint(with: Workspace.Theme) {
override func repaint(with theme: Workspace.Theme) {
self.selectHtmlFile.image = NSImage.fontAwesomeIcon(
name: .fileCode,
style: .solid,
textColor: theme.toolbarForeground,
dimension: InnerToolBar.iconDimension
)
}
private func addViews() {
let selectHtmlFile = self.selectHtmlFile
InnerToolBar.configureToStandardIconButton(button: selectHtmlFile, iconName: .fileCode, style: .regular)
InnerToolBar.configureToStandardIconButton(
button: selectHtmlFile,
iconName: .fileCode,
style: .solid
)
selectHtmlFile.toolTip = "Select the HTML file"
selectHtmlFile.action = #selector(HtmlPreviewTool.selectHtmlFile)

View File

@ -110,7 +110,7 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
)
self.closeButton.image = NSImage.fontAwesomeIcon(
name: .timesCircle,
style: .regular,
style: .solid,
textColor: self.theme.toolbarForeground,
dimension: InnerToolBar.iconDimension
)
@ -173,7 +173,7 @@ class InnerToolBar: NSView, NSUserInterfaceValidations {
InnerToolBar.configureToStandardIconButton(
button: close,
iconName: .timesCircle,
style: .regular,
style: .solid,
color: self.theme.toolbarForeground
)
close.target = self