mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 12:00:09 +02:00
👌 Improve macOS Ventura appearance (#176)
This commit is contained in:
38
phpmon/Assets.xcassets/AppSecondary.colorset/Contents.json
Normal file
38
phpmon/Assets.xcassets/AppSecondary.colorset/Contents.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.250",
|
||||
"green" : "0.250",
|
||||
"red" : "0.250"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.750",
|
||||
"green" : "0.750",
|
||||
"red" : "0.750"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@ -7,8 +7,13 @@
|
||||
import Foundation
|
||||
|
||||
extension String {
|
||||
|
||||
var localized: String {
|
||||
if #available(macOS 13, *) {
|
||||
return NSLocalizedString(
|
||||
self, tableName: nil, bundle: Bundle.main, value: "", comment: ""
|
||||
).replacingOccurrences(of: "Preferences", with: "Settings")
|
||||
}
|
||||
|
||||
return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "")
|
||||
}
|
||||
|
||||
@ -32,7 +37,7 @@ extension String {
|
||||
return count
|
||||
}
|
||||
|
||||
subscript (r: Range<String.Index>) -> String {
|
||||
subscript(r: Range<String.Index>) -> String {
|
||||
let start = r.lowerBound
|
||||
let end = r.upperBound
|
||||
return String(self[start ..< end])
|
||||
|
@ -18,13 +18,13 @@ extension StatusMenu {
|
||||
NSMenuItem(title: "mi_php_config".localized,
|
||||
action: #selector(MainMenu.openActiveConfigFolder), keyEquivalent: "c")
|
||||
)
|
||||
self.addItem(
|
||||
NSMenuItem(title: "mi_phpinfo".localized, action: #selector(MainMenu.openPhpInfo), keyEquivalent: "i")
|
||||
)
|
||||
self.addItem(
|
||||
NSMenuItem(title: "mi_phpmon_config".localized,
|
||||
action: #selector(MainMenu.openPhpMonitorConfigurationFile), keyEquivalent: "y")
|
||||
)
|
||||
self.addItem(
|
||||
NSMenuItem(title: "mi_phpinfo".localized, action: #selector(MainMenu.openPhpInfo), keyEquivalent: "i")
|
||||
)
|
||||
}
|
||||
|
||||
func addComposerMenuItems() {
|
||||
|
@ -15,6 +15,9 @@ var isRunningSwiftUIPreview: Bool {
|
||||
}
|
||||
|
||||
extension Color {
|
||||
public static var appPrimary: Color = Color("AppColor")
|
||||
public static var appSecondary: Color = Color("AppSecondary")
|
||||
|
||||
public static var debug: Color = {
|
||||
if ProcessInfo.processInfo.environment["PAINT_PHPMON_SWIFTUI_VIEWS"] != nil {
|
||||
return Color.yellow
|
||||
|
@ -15,7 +15,7 @@ struct HeaderView: View {
|
||||
Text(text.uppercased())
|
||||
.font(.system(size: 12))
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundColor(.appSecondary)
|
||||
.multilineTextAlignment(.leading)
|
||||
.padding(.leading, 14.0)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
@ -16,7 +16,7 @@ struct SectionHeaderView: View {
|
||||
Text(text)
|
||||
.font(.system(size: 11))
|
||||
.fontWeight(.medium)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundColor(.appSecondary)
|
||||
.background(Color.debug)
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ struct CheckmarkView: View {
|
||||
Image(systemName: "hourglass.circle")
|
||||
.resizable()
|
||||
.frame(width: 16.0, height: 16.0)
|
||||
.foregroundColor(.secondary)
|
||||
.foregroundColor(.appSecondary)
|
||||
} else {
|
||||
if busy {
|
||||
ProgressView()
|
||||
|
Reference in New Issue
Block a user