mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 23:02: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:
parent
b5282a89a8
commit
d5344ce046
@ -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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -62,6 +62,16 @@
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
<AdditionalOption
|
||||
key = "MallocStackLogging"
|
||||
value = ""
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
<AdditionalOption
|
||||
key = "PrefersMallocStackLoggingLite"
|
||||
value = ""
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user