Use .element.accent instead of elementGreen colour asset. (#79)

Remove local copy of Element Green
This commit is contained in:
Doug
2022-06-13 08:38:28 +01:00
committed by GitHub
parent c96ee095d0
commit 272fc5000b
18 changed files with 23 additions and 63 deletions
+1 -3
View File
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
@@ -2009,7 +2009,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Colors/ElementGreen;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -2069,7 +2068,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = Colors/ElementGreen;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -1,38 +0,0 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "139",
"green" : "189",
"red" : "13"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "139",
"green" : "198",
"red" : "13"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -1,23 +1,16 @@
{
"images" : [
{
"filename" : "send_message_icon.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "send_message_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "send_message_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
"filename" : "timelineComposerSendMessage.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M18,0C27.934,0 36,8.066 36,18C36,27.934 27.934,36 18,36C8.066,36 0,27.934 0,18C0,8.066 8.066,0 18,0ZM27.83,19.085L12.259,26.867C11.21,27.391 10.119,26.266 10.631,25.24C10.631,25.24 12.561,21.343 13.092,20.322C13.623,19.301 14.23,19.124 19.874,18.395C20.082,18.368 20.253,18.21 20.253,18C20.253,17.79 20.082,17.632 19.874,17.605C14.23,16.876 13.623,16.699 13.092,15.678C12.561,14.658 10.631,10.76 10.631,10.76C10.119,9.734 11.21,8.609 12.259,9.133L27.83,16.915C28.724,17.362 28.724,18.638 27.83,19.085Z" style="fill:rgb(13,189,139);"/>
</svg>

After

Width:  |  Height:  |  Size: 998 B

+1
View File
@@ -49,6 +49,7 @@ class AppCoordinator: AuthenticationCoordinatorDelegate, Coordinator {
mainNavigationController = UINavigationController(rootViewController: splashViewController)
window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = mainNavigationController
window.tintColor = .element.accent
navigationRouter = NavigationRouter(navigationController: mainNavigationController)
-1
View File
@@ -23,7 +23,6 @@ internal typealias AssetImageTypeAlias = ImageAsset.Image
internal enum Asset {
internal enum Colors {
internal static let codeBlockBackground = ColorAsset(name: "Colors/CodeBlockBackground")
internal static let elementGreen = ColorAsset(name: "Colors/ElementGreen")
}
internal enum Images {
internal static let appLogo = ImageAsset(name: "Images/app-logo")
@@ -16,7 +16,7 @@ struct ElementToggleStyle: ToggleStyle {
Image(systemName: configuration.isOn ? "checkmark.square.fill" : "square")
.font(.title3.weight(.regular))
.imageScale(.large)
.foregroundColor(Color(uiColor: Asset.Colors.elementGreen.color))
.foregroundColor(.element.accent)
}
.buttonStyle(.plain)
}
@@ -21,6 +21,10 @@ struct MessageComposer: View {
action()
} label: {
Image(uiImage: Asset.Images.timelineComposerSendMessage.image)
.background(Circle()
.foregroundColor(.element.globalWhite)
.padding(2)
)
}
.padding(.bottom, 6.0)
.disabled(disabled)
@@ -32,7 +32,7 @@ struct MessageComposerTextField: View {
}
private var borderColor: Color {
Color(uiColor: Asset.Colors.elementGreen.color)
.element.accent
}
private var borderWidth: CGFloat {
@@ -31,7 +31,7 @@ struct EventBasedTimelineView: View {
Image(uiImage: avatar)
.resizable()
.scaledToFill()
.overlay(Circle().stroke(Color(uiColor: Asset.Colors.elementGreen.color)))
.overlay(Circle().stroke(Color.element.accent))
} else {
PlaceholderAvatarImage(firstCharacter: String(firstLetter))
}
@@ -29,7 +29,7 @@ struct FormattedBodyText: View {
}
}
}
.tint(Color(uiColor: Asset.Colors.elementGreen.color))
.tint(.element.accent)
}
}
@@ -22,7 +22,7 @@ struct PlaceholderAvatarImage: View {
var body: some View {
ZStack {
Color(.sRGB, red: 0.05, green: 0.74, blue: 0.55, opacity: 1.0)
Color.element.accent
Text(firstCharacter)
.padding(4)
.foregroundColor(.white)
@@ -20,7 +20,6 @@
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Images/app-logo" translatesAutoresizingMaskIntoConstraints="NO" id="ue7-fB-5XS">
<rect key="frame" x="87" y="328" width="240" height="240"/>
<color key="tintColor" red="0.050980392156862744" green="0.74117647058823533" blue="0.54509803921568623" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
+1 -1
View File
@@ -1 +1 @@
DesignKit: Add DesignKit to the ElementX project and style the login screen with it.
DesignKit: Add DesignKit to the ElementX project, style the login screen with it and tint the whole app.
-1
View File
@@ -20,7 +20,6 @@ options:
settings:
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: "Colors/ElementGreen"
ENABLE_BITCODE: NO