fix: menu selecting state not update in time in mac os 14

This commit is contained in:
yicheng 2023-06-09 15:24:24 +08:00
parent 6fb8a1a627
commit 34f9a16aca
3 changed files with 9 additions and 3 deletions

View File

@ -15,7 +15,13 @@ class MenuItemBaseView: NSView {
// MARK: Public
var isHighlighted: Bool = false
var isHighlighted: Bool = false {
didSet {
if isHighlighted != oldValue {
setNeedsDisplay()
}
}
}
let effectView: NSVisualEffectView = {
let effectView = NSVisualEffectView()

View File

@ -8,7 +8,7 @@ post_install do |installer|
config.build_settings['SWIFT_VERSION'] = '5'
end
end
if config.build_settings['MACOSX_DEPLOYMENT_TARGET'] == ''
if config.build_settings['MACOSX_DEPLOYMENT_TARGET'] == '' || Gem::Version.new(config.build_settings['MACOSX_DEPLOYMENT_TARGET']) < Gem::Version.new("10.13")
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.13'
end
end

View File

@ -68,6 +68,6 @@ SPEC CHECKSUMS:
SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e
WebViewJavascriptBridge: 7f5bc4d3581e672e8f32bd0f812d54bc69bb8e29
PODFILE CHECKSUM: 9b9952fcf44ecd26932a2cf4bb79d03f8850d67b
PODFILE CHECKSUM: 7a4b4f95913a2481c21fe728bf31871a3b75fb6c
COCOAPODS: 1.12.1