mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-08 21:37:05 +01: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
|
import Foundation
|
||||||
|
|
||||||
extension String {
|
extension String {
|
||||||
|
|
||||||
var localized: 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: "")
|
return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: "", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +37,7 @@ extension String {
|
|||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|
||||||
subscript (r: Range<String.Index>) -> String {
|
subscript(r: Range<String.Index>) -> String {
|
||||||
let start = r.lowerBound
|
let start = r.lowerBound
|
||||||
let end = r.upperBound
|
let end = r.upperBound
|
||||||
return String(self[start ..< end])
|
return String(self[start ..< end])
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ extension StatusMenu {
|
|||||||
NSMenuItem(title: "mi_php_config".localized,
|
NSMenuItem(title: "mi_php_config".localized,
|
||||||
action: #selector(MainMenu.openActiveConfigFolder), keyEquivalent: "c")
|
action: #selector(MainMenu.openActiveConfigFolder), keyEquivalent: "c")
|
||||||
)
|
)
|
||||||
self.addItem(
|
|
||||||
NSMenuItem(title: "mi_phpinfo".localized, action: #selector(MainMenu.openPhpInfo), keyEquivalent: "i")
|
|
||||||
)
|
|
||||||
self.addItem(
|
self.addItem(
|
||||||
NSMenuItem(title: "mi_phpmon_config".localized,
|
NSMenuItem(title: "mi_phpmon_config".localized,
|
||||||
action: #selector(MainMenu.openPhpMonitorConfigurationFile), keyEquivalent: "y")
|
action: #selector(MainMenu.openPhpMonitorConfigurationFile), keyEquivalent: "y")
|
||||||
)
|
)
|
||||||
|
self.addItem(
|
||||||
|
NSMenuItem(title: "mi_phpinfo".localized, action: #selector(MainMenu.openPhpInfo), keyEquivalent: "i")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func addComposerMenuItems() {
|
func addComposerMenuItems() {
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ var isRunningSwiftUIPreview: Bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension Color {
|
extension Color {
|
||||||
|
public static var appPrimary: Color = Color("AppColor")
|
||||||
|
public static var appSecondary: Color = Color("AppSecondary")
|
||||||
|
|
||||||
public static var debug: Color = {
|
public static var debug: Color = {
|
||||||
if ProcessInfo.processInfo.environment["PAINT_PHPMON_SWIFTUI_VIEWS"] != nil {
|
if ProcessInfo.processInfo.environment["PAINT_PHPMON_SWIFTUI_VIEWS"] != nil {
|
||||||
return Color.yellow
|
return Color.yellow
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ struct HeaderView: View {
|
|||||||
Text(text.uppercased())
|
Text(text.uppercased())
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.appSecondary)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.padding(.leading, 14.0)
|
.padding(.leading, 14.0)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ struct SectionHeaderView: View {
|
|||||||
Text(text)
|
Text(text)
|
||||||
.font(.system(size: 11))
|
.font(.system(size: 11))
|
||||||
.fontWeight(.medium)
|
.fontWeight(.medium)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.appSecondary)
|
||||||
.background(Color.debug)
|
.background(Color.debug)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ struct CheckmarkView: View {
|
|||||||
Image(systemName: "hourglass.circle")
|
Image(systemName: "hourglass.circle")
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 16.0, height: 16.0)
|
.frame(width: 16.0, height: 16.0)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.appSecondary)
|
||||||
} else {
|
} else {
|
||||||
if busy {
|
if busy {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
|
|||||||
Reference in New Issue
Block a user