Fix palette access and QMediaPlayer errors
1 files changed, 7 insertions, 7 deletions
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index eb46a9ac..39e8b1a8 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -19,15 +19,15 @@ MatrixText {
// table border-collapse doesn't seem to work
text: "
<style type=\"text/css\">
- a { color:" + Nheko.colors.link + ";}
- code { background-color: " + Nheko.colors.alternateBase + "; white-space: pre-wrap; }
- pre { background-color: " + Nheko.colors.alternateBase + "; white-space: pre-wrap; }
+ a { color:" + palette.link + ";}
+ code { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
+ pre { background-color: " + palette.alternateBase + "; white-space: pre-wrap; }
table {
border-width: 1px;
border-collapse: collapse;
border-style: solid;
- border-color: " + Nheko.colors.text + ";
- background-color: " + Nheko.colors.alternateBase + ";
+ border-color: " + palette.text + ";
+ background-color: " + palette.alternateBase + ";
}
table th,
table td {
@@ -36,11 +36,11 @@ MatrixText {
blockquote { margin-left: 1em; }
" + (!Settings.mobileMode ? "span[data-mx-spoiler] {
color: transparent;
- background-color: " + Nheko.colors.text + ";
+ background-color: " + palette.text + ";
}" : "") + // TODO(Nico): Figure out how to support mobile
"</style>
" + formatted.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
- width: parent.width
+ width: parent?.width ?? 0
height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
clip: !keepFullText
selectByMouse: !Settings.mobileMode && !isReply
|