diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 4adc63833..e0375169d 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -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; diff --git a/ElementX/Resources/Assets.xcassets/Colors/ElementGreen.colorset/Contents.json b/ElementX/Resources/Assets.xcassets/Colors/ElementGreen.colorset/Contents.json deleted file mode 100644 index 67097973b..000000000 --- a/ElementX/Resources/Assets.xcassets/Colors/ElementGreen.colorset/Contents.json +++ /dev/null @@ -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 - } -} diff --git a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/Contents.json b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/Contents.json index 533ee1b36..538eaa5da 100644 --- a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/Contents.json +++ b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/Contents.json @@ -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" } } diff --git a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon.png b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon.png deleted file mode 100644 index 02dc65a0b..000000000 Binary files a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon.png and /dev/null differ diff --git a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@2x.png b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@2x.png deleted file mode 100644 index 28b0183c6..000000000 Binary files a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@2x.png and /dev/null differ diff --git a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@3x.png b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@3x.png deleted file mode 100644 index 4e3719595..000000000 Binary files a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/send_message_icon@3x.png and /dev/null differ diff --git a/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/timelineComposerSendMessage.svg b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/timelineComposerSendMessage.svg new file mode 100644 index 000000000..a9d140d06 --- /dev/null +++ b/ElementX/Resources/Assets.xcassets/Images/timelineComposerSendMessage.imageset/timelineComposerSendMessage.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ElementX/Sources/AppCoordinator.swift b/ElementX/Sources/AppCoordinator.swift index 3c5483074..0851e1ab7 100644 --- a/ElementX/Sources/AppCoordinator.swift +++ b/ElementX/Sources/AppCoordinator.swift @@ -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) diff --git a/ElementX/Sources/Generated/Assets.swift b/ElementX/Sources/Generated/Assets.swift index de517a621..2958ff274 100644 --- a/ElementX/Sources/Generated/Assets.swift +++ b/ElementX/Sources/Generated/Assets.swift @@ -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") diff --git a/ElementX/Sources/Other/SwiftUI/Views/ElementToggleStyle.swift b/ElementX/Sources/Other/SwiftUI/Views/ElementToggleStyle.swift index ce2acd1ed..200a61726 100644 --- a/ElementX/Sources/Other/SwiftUI/Views/ElementToggleStyle.swift +++ b/ElementX/Sources/Other/SwiftUI/Views/ElementToggleStyle.swift @@ -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) } diff --git a/ElementX/Sources/Screens/RoomScreen/View/MessageComposer.swift b/ElementX/Sources/Screens/RoomScreen/View/MessageComposer.swift index e5c3bd332..0d487e925 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/MessageComposer.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/MessageComposer.swift @@ -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) diff --git a/ElementX/Sources/Screens/RoomScreen/View/MessageComposerTextField.swift b/ElementX/Sources/Screens/RoomScreen/View/MessageComposerTextField.swift index e761918f8..f525c42d4 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/MessageComposerTextField.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/MessageComposerTextField.swift @@ -32,7 +32,7 @@ struct MessageComposerTextField: View { } private var borderColor: Color { - Color(uiColor: Asset.Colors.elementGreen.color) + .element.accent } private var borderWidth: CGFloat { diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/EventBasedTimelineView.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/EventBasedTimelineView.swift index f95a3d933..4a8e6ef68 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/EventBasedTimelineView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/EventBasedTimelineView.swift @@ -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)) } diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/FormattedBodyText.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/FormattedBodyText.swift index ce8676b96..13aaba784 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/FormattedBodyText.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/FormattedBodyText.swift @@ -29,7 +29,7 @@ struct FormattedBodyText: View { } } } - .tint(Color(uiColor: Asset.Colors.elementGreen.color)) + .tint(.element.accent) } } diff --git a/ElementX/Sources/Screens/RoomScreen/View/Timeline/PlaceholderAvatarImage.swift b/ElementX/Sources/Screens/RoomScreen/View/Timeline/PlaceholderAvatarImage.swift index 09737d5c2..508a16481 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Timeline/PlaceholderAvatarImage.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Timeline/PlaceholderAvatarImage.swift @@ -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) diff --git a/ElementX/Sources/Screens/Splash/SplashViewController.xib b/ElementX/Sources/Screens/Splash/SplashViewController.xib index 33d458e55..ae27f9387 100644 --- a/ElementX/Sources/Screens/Splash/SplashViewController.xib +++ b/ElementX/Sources/Screens/Splash/SplashViewController.xib @@ -20,7 +20,6 @@ - diff --git a/changelog.d/43.change b/changelog.d/43.change index 65e2931e4..04f62c8eb 100644 --- a/changelog.d/43.change +++ b/changelog.d/43.change @@ -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. diff --git a/project.yml b/project.yml index 29a3279cf..ec131bc64 100644 --- a/project.yml +++ b/project.yml @@ -20,7 +20,6 @@ options: settings: CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: "Colors/ElementGreen" ENABLE_BITCODE: NO