This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A method to persist template changes to disk | |
* | |
* This helper writes template changes to their appropriate HTML file instead of saving | |
* them to the DB, helping make local theme development of block based themes more | |
* efficient. | |
*/ | |
declare ( strict_types = 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Example { | |
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) | |
Let menubarStringValue = "example" | |
func updateValue() { | |
if #available(OSX 10.15, *){ | |
let attributes = [NSAttributedString.Key.font: NSFont.monospacedSystemFont(ofSize: NSFont.systemFontSize(for: self.statusItem.button!.controlSize), weight: NSFont.Weight.medium)] | |
let attrString = NSAttributedString(string: (self.menubarStringValue), attributes: attributes) | |
} else { |