diff --git a/resources/qml/MatrixText.qml b/resources/qml/MatrixText.qml
index 9a4f7348..cbb1c888 100644
--- a/resources/qml/MatrixText.qml
+++ b/resources/qml/MatrixText.qml
@@ -1,12 +1,15 @@
import QtQuick 2.5
import QtQuick.Controls 2.3
-TextEdit {
+TextArea {
textFormat: TextEdit.RichText
readOnly: true
wrapMode: Text.Wrap
selectByMouse: true
- color: colors.text
+ //color: colors.text
+ palette: colors
+
+ padding: 0
onLinkActivated: {
if (/^https:\/\/matrix.to\/#\/(@.*)$/.test(link)) chat.model.openUserProfile(/^https:\/\/matrix.to\/#\/(@.*)$/.exec(link)[1])
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index b707ae74..7e4b1f29 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -2,6 +2,6 @@ import ".."
MatrixText {
property string formatted: model.data.formattedBody
- text: formatted.replace("<pre>", "<pre style='white-space: pre-wrap'>")
+ text: "<style type=\"text/css\">a { color:"+colors.link+";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap'>")
width: parent ? parent.width : undefined
}
diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss
index 33e8e150..37c524c7 100644
--- a/resources/styles/nheko-dark.qss
+++ b/resources/styles/nheko-dark.qss
@@ -3,6 +3,10 @@ QLabel {
color: #caccd1;
}
+TextLabel::a {
+ color: #38a3d8;
+}
+
QuickSwitcher,
ReplyPopup,
SuggestionsPopup,
diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss
index eeb90323..26482db8 100644
--- a/resources/styles/nheko.qss
+++ b/resources/styles/nheko.qss
@@ -3,6 +3,11 @@ QLabel {
color: #333;
}
+TextLabel::a {
+ color: #0077b5;
+}
+
+
QuickSwitcher,
ReplyPopup,
SuggestionsPopup,
|