diff --git a/library/ui-styles/src/main/res/values/attrs_sc.xml b/library/ui-styles/src/main/res/values/attrs_sc.xml
index e952c7f092..4ccf77fa79 100644
--- a/library/ui-styles/src/main/res/values/attrs_sc.xml
+++ b/library/ui-styles/src/main/res/values/attrs_sc.xml
@@ -17,6 +17,7 @@
+
diff --git a/library/ui-styles/src/main/res/values/theme_dark.xml b/library/ui-styles/src/main/res/values/theme_dark.xml
index bfedc419c3..63e4211dd4 100644
--- a/library/ui-styles/src/main/res/values/theme_dark.xml
+++ b/library/ui-styles/src/main/res/values/theme_dark.xml
@@ -126,6 +126,7 @@
- @style/Widget.Vector.TextInputLayout.Dense.ExposedDropdownMenu.Dark.SC
- ?vctr_header_background
- #19ffffff
+ - ?code_block_bg_color
- @color/user_color_element_pl_0
- @color/user_color_element_pl_1
- @color/user_color_element_pl_50
diff --git a/library/ui-styles/src/main/res/values/theme_light.xml b/library/ui-styles/src/main/res/values/theme_light.xml
index c01c725b4a..68e0eff991 100644
--- a/library/ui-styles/src/main/res/values/theme_light.xml
+++ b/library/ui-styles/src/main/res/values/theme_light.xml
@@ -126,6 +126,7 @@
- @style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu
- ?vctr_header_background
- #19000000
+ - ?code_block_bg_color
- @color/user_color_element_pl_0
- @color/user_color_element_pl_1
- @color/user_color_element_pl_50
diff --git a/library/ui-styles/src/main/res/values/theme_sc.xml b/library/ui-styles/src/main/res/values/theme_sc.xml
index 33bb89ff4f..4ae5942b2c 100644
--- a/library/ui-styles/src/main/res/values/theme_sc.xml
+++ b/library/ui-styles/src/main/res/values/theme_sc.xml
@@ -87,6 +87,7 @@
- @color/accent_sc_pale
- @color/accent_sc_alpha25
- @color/code_background_sc
+ - ?vctr_content_quaternary
- @color/user_color_sc_pl_0
- @color/user_color_sc_pl_1
- @color/user_color_sc_pl_50
diff --git a/library/ui-styles/src/main/res/values/theme_sc_light.xml b/library/ui-styles/src/main/res/values/theme_sc_light.xml
index 89049c4f24..61a0da6bfe 100644
--- a/library/ui-styles/src/main/res/values/theme_sc_light.xml
+++ b/library/ui-styles/src/main/res/values/theme_sc_light.xml
@@ -87,6 +87,7 @@
- @color/accent_sc_pale
- #ffe0e0e0
- @color/code_background_sc_light
+ - ?vctr_content_quaternary
- @color/user_color_sc_pl_0
- @color/user_color_sc_pl_1
- @color/user_color_sc_pl_50
diff --git a/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt b/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt
index 5bdac9e34d..865606fae1 100644
--- a/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt
+++ b/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt
@@ -37,8 +37,11 @@ class EventHtmlRenderer @Inject constructor(private val htmlConfigure: MatrixHtm
private fun resolveCodeBlockBackground() =
ThemeUtils.getColor(context, R.attr.code_block_bg_color)
+ private fun resolveQuoteBarColor() =
+ ThemeUtils.getColor(context, R.attr.quote_bar_color)
private var codeBlockBackground: Int = resolveCodeBlockBackground()
+ private var quoteBarColor: Int = resolveQuoteBarColor()
interface PostProcessor {
fun afterRender(renderedText: Spannable)
@@ -52,6 +55,7 @@ class EventHtmlRenderer @Inject constructor(private val htmlConfigure: MatrixHtm
super.configureTheme(builder)
builder.codeBlockBackgroundColor(codeBlockBackground)
.codeBackgroundColor(codeBlockBackground)
+ .blockQuoteColor(quoteBarColor)
}
}
))
@@ -60,8 +64,17 @@ class EventHtmlRenderer @Inject constructor(private val htmlConfigure: MatrixHtm
private var markwon: Markwon = buildMarkwon()
get() {
val newCodeBlockBackground = resolveCodeBlockBackground()
+ val newQuoteBarColor = resolveQuoteBarColor()
+ var changed = false
if (codeBlockBackground != newCodeBlockBackground) {
codeBlockBackground = newCodeBlockBackground
+ changed = true
+ }
+ if (quoteBarColor != newQuoteBarColor) {
+ quoteBarColor = newQuoteBarColor
+ changed = true
+ }
+ if (changed) {
field = buildMarkwon()
}
return field