mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
🍱 Fix colors for dark mode (#101)
This commit is contained in:
38
phpmon/Assets.xcassets/IconColorGreen.colorset/Contents.json
Normal file
38
phpmon/Assets.xcassets/IconColorGreen.colorset/Contents.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.501",
|
||||||
|
"green" : "0.697",
|
||||||
|
"red" : "0.247"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.501",
|
||||||
|
"green" : "0.765",
|
||||||
|
"red" : "0.247"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.000",
|
||||||
|
"green" : "0.000",
|
||||||
|
"red" : "0.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "1.000",
|
||||||
|
"green" : "1.000",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
38
phpmon/Assets.xcassets/IconColorRed.colorset/Contents.json
Normal file
38
phpmon/Assets.xcassets/IconColorRed.colorset/Contents.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.180",
|
||||||
|
"green" : "0.000",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.426",
|
||||||
|
"green" : "0.363",
|
||||||
|
"red" : "1.000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
|
||||||
<capability name="Image references" minToolsVersion="12.0"/>
|
<capability name="Image references" minToolsVersion="12.0"/>
|
||||||
|
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||||
<capability name="Search Toolbar Item" minToolsVersion="12.0" minSystemVersion="11.0"/>
|
<capability name="Search Toolbar Item" minToolsVersion="12.0" minSystemVersion="11.0"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -690,7 +691,7 @@ Gw
|
|||||||
<constraint firstAttribute="width" constant="14" id="wrl-lJ-3eN"/>
|
<constraint firstAttribute="width" constant="14" id="wrl-lJ-3eN"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Checkmark" id="R5o-Cd-a91"/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Checkmark" id="R5o-Cd-a91"/>
|
||||||
<color key="contentTintColor" name="systemGreenColor" catalog="System" colorSpace="catalog"/>
|
<color key="contentTintColor" name="IconColorGreen"/>
|
||||||
</imageView>
|
</imageView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
@ -784,5 +785,8 @@ Gw
|
|||||||
<image name="Lock" width="30" height="30"/>
|
<image name="Lock" width="30" height="30"/>
|
||||||
<image name="arrow.clockwise" catalog="system" width="14" height="16"/>
|
<image name="arrow.clockwise" catalog="system" width="14" height="16"/>
|
||||||
<image name="plus" catalog="system" width="14" height="13"/>
|
<image name="plus" catalog="system" width="14" height="13"/>
|
||||||
|
<namedColor name="IconColorGreen">
|
||||||
|
<color red="0.2467108965" green="0.56980162858963013" blue="0.50060153009999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
</namedColor>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
@ -21,6 +21,9 @@ class ServicesView: NSView, XibLoadable {
|
|||||||
|
|
||||||
static func asMenuItem() -> NSMenuItem {
|
static func asMenuItem() -> NSMenuItem {
|
||||||
let view = Self.createFromXib()!
|
let view = Self.createFromXib()!
|
||||||
|
[view.imageViewPhp, view.imageViewNginx, view.imageViewDnsmasq].forEach { imageView in
|
||||||
|
imageView?.contentTintColor = NSColor(named: "IconColorNormal")
|
||||||
|
}
|
||||||
let item = NSMenuItem()
|
let item = NSMenuItem()
|
||||||
item.view = view
|
item.view = view
|
||||||
item.target = self
|
item.target = self
|
||||||
@ -80,20 +83,18 @@ class ServicesView: NSView, XibLoadable {
|
|||||||
func applyServiceStyling(_ serviceName: String, _ imageView: NSImageView) {
|
func applyServiceStyling(_ serviceName: String, _ imageView: NSImageView) {
|
||||||
if ServicesView.services[serviceName] == nil {
|
if ServicesView.services[serviceName] == nil {
|
||||||
imageView.image = NSImage(named: "ServiceLoading")
|
imageView.image = NSImage(named: "ServiceLoading")
|
||||||
imageView.contentTintColor = NSColor.black
|
imageView.contentTintColor = NSColor(named: "IconColorNormal")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ServicesView.services[serviceName]!.running {
|
if ServicesView.services[serviceName]!.running {
|
||||||
imageView.image = NSImage(named: "ServiceOn")
|
imageView.image = NSImage(named: "ServiceOn")
|
||||||
imageView.contentTintColor = NSColor.black
|
imageView.contentTintColor = NSColor(named: "IconColorNormal")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
imageView.image = NSImage(named: "ServiceOff")
|
imageView.image = NSImage(named: "ServiceOff")
|
||||||
imageView.contentTintColor = NSColor.init(
|
imageView.contentTintColor = NSColor(named: "IconColorRed")
|
||||||
red: 246/255, green: 71/255, blue: 71/255, alpha: 1.0
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deinit {
|
deinit {
|
||||||
|
@ -49,8 +49,8 @@ class SiteListCell: NSTableCellView
|
|||||||
// Show the green or red lock based on whether the site was secured
|
// Show the green or red lock based on whether the site was secured
|
||||||
// imageViewLock.image = NSImage(named: site.secured ? "Lock" : "LockUnlocked")
|
// imageViewLock.image = NSImage(named: site.secured ? "Lock" : "LockUnlocked")
|
||||||
imageViewLock.contentTintColor = site.secured ?
|
imageViewLock.contentTintColor = site.secured ?
|
||||||
NSColor.init(red: 63/255, green: 195/255, blue: 128/255, alpha: 1.0) // green
|
NSColor(named: "IconColorGreen") // green
|
||||||
: NSColor.init(red: 246/255, green: 71/255, blue: 71/255, alpha: 1.0) // red
|
: NSColor(named: "IconColorRed")
|
||||||
|
|
||||||
// Show the current driver
|
// Show the current driver
|
||||||
labelDriverType.stringValue = site.driverDeterminedByComposer
|
labelDriverType.stringValue = site.driverDeterminedByComposer
|
||||||
|
Reference in New Issue
Block a user