Skip to content

Commit

Permalink
fix: menu selecting state not update in time in mac os 14
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengchen committed Jun 9, 2023
1 parent 6fb8a1a commit 34f9a16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ClashX/Views/MenuItemBaseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ SPEC CHECKSUMS:
SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e
WebViewJavascriptBridge: 7f5bc4d3581e672e8f32bd0f812d54bc69bb8e29

PODFILE CHECKSUM: 9b9952fcf44ecd26932a2cf4bb79d03f8850d67b
PODFILE CHECKSUM: 7a4b4f95913a2481c21fe728bf31871a3b75fb6c

COCOAPODS: 1.12.1

0 comments on commit 34f9a16

Please sign in to comment.