mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-13 15:54:10 +09:00
fixed: fixed missing background on older macOS (#3015)
This commit is contained in:
@@ -2867,7 +2867,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.5;
|
||||
MARKETING_VERSION = 2.12.2;
|
||||
MARKETING_VERSION = 2.12.3;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -2904,7 +2904,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.5;
|
||||
MARKETING_VERSION = 2.12.2;
|
||||
MARKETING_VERSION = 2.12.3;
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>754</string>
|
||||
<string>756</string>
|
||||
<key>Description</key>
|
||||
<string>Simple macOS system monitor in your menu bar</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
@@ -219,14 +219,34 @@ class SettingsWindow: NSWindow, NSWindowDelegate, NSToolbarDelegate {
|
||||
private class MainView: NSView {
|
||||
fileprivate let container: NSStackView = NSStackView()
|
||||
|
||||
private let background: NSVisualEffectView = {
|
||||
let view = NSVisualEffectView(frame: NSRect.zero)
|
||||
view.blendingMode = .withinWindow
|
||||
view.material = .contentBackground
|
||||
view.state = .active
|
||||
view.translatesAutoresizingMaskIntoConstraints = false
|
||||
view.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||
view.setContentHuggingPriority(.defaultLow, for: .vertical)
|
||||
view.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||
view.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
|
||||
return view
|
||||
}()
|
||||
|
||||
override init(frame: NSRect) {
|
||||
super.init(frame: NSRect.zero)
|
||||
|
||||
self.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.container.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
self.addSubview(self.background, positioned: .below, relativeTo: .none)
|
||||
self.addSubview(self.container)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
self.background.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||
self.background.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||
self.background.topAnchor.constraint(equalTo: topAnchor),
|
||||
self.background.bottomAnchor.constraint(equalTo: bottomAnchor),
|
||||
|
||||
self.container.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||
self.container.trailingAnchor.constraint(equalTo: trailingAnchor),
|
||||
self.container.topAnchor.constraint(equalTo: topAnchor, constant: Constants.Popup.headerHeight*1.4),
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.12.2</string>
|
||||
<string>2.12.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>754</string>
|
||||
<string>756</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
|
||||
Reference in New Issue
Block a user