Message bubbles: Use new background colors.

This commit is contained in:
SBiOSoftWhare
2022-01-31 17:42:54 +01:00
parent c51787133c
commit 223d1802c1
9 changed files with 22 additions and 34 deletions
@@ -24,11 +24,11 @@ class BubbleRoomCellLayoutUpdater: RoomCellLayoutUpdating {
private var theme: Theme
private var incomingColor: UIColor {
return self.theme.bubbleCellIncomingBackgroundColor
return self.theme.roomCellIncomingBubbleBackgroundColor
}
private var outgoingColor: UIColor {
return self.theme.bubbleCellOutgoingBackgroundColor
return self.theme.roomCellOutgoingBubbleBackgroundColor
}
// MARK: - Setup
@@ -34,6 +34,6 @@ class FileWithoutThumbnailIncomingBubbleCell: FileWithoutThumbnailBaseBubbleCell
override func update(theme: Theme) {
super.update(theme: theme)
self.fileAttachementView?.backgroundColor = theme.bubbleCellIncomingBackgroundColor
self.fileAttachementView?.backgroundColor = theme.roomCellIncomingBubbleBackgroundColor
}
}
@@ -35,6 +35,6 @@ class FileWithoutThumbnailOutoingWithoutSenderInfoBubbleCell: FileWithoutThumbna
override func update(theme: Theme) {
super.update(theme: theme)
self.fileAttachementView?.backgroundColor = theme.bubbleCellOutgoingBackgroundColor
self.fileAttachementView?.backgroundColor = theme.roomCellOutgoingBubbleBackgroundColor
}
}
@@ -38,6 +38,6 @@ class VoiceMessageIncomingBubbleCell: VoiceMessageBubbleCell {
return
}
playbackController.playbackView.backgroundViewColor = theme.bubbleCellIncomingBackgroundColor
playbackController.playbackView.backgroundViewColor = theme.roomCellIncomingBubbleBackgroundColor
}
}
@@ -41,6 +41,6 @@ class VoiceMessageOutgoingWithoutSenderInfoBubbleCell: VoiceMessageBubbleCell {
return
}
playbackController.playbackView.backgroundViewColor = theme.bubbleCellOutgoingBackgroundColor
playbackController.playbackView.backgroundViewColor = theme.roomCellOutgoingBubbleBackgroundColor
}
}
@@ -1,28 +0,0 @@
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import Foundation
extension Theme {
var bubbleCellIncomingBackgroundColor: UIColor {
return self.colors.system
}
var bubbleCellOutgoingBackgroundColor: UIColor {
return self.colors.accent.withAlphaComponent(0.10)
}
}