mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Add ugly borders to tables
This commit is contained in:
parent
7f4656d3c3
commit
1da3f2e1da
1 changed files with 18 additions and 1 deletions
|
@ -9,7 +9,24 @@ MatrixText {
|
||||||
property string formatted: model.data.formattedBody
|
property string formatted: model.data.formattedBody
|
||||||
property string copyText: selectedText ? getText(selectionStart, selectionEnd) : model.data.body
|
property string copyText: selectedText ? getText(selectionStart, selectionEnd) : model.data.body
|
||||||
|
|
||||||
text: "<style type=\"text/css\">a { color:" + Nheko.colors.link + ";}\ncode { background-color: " + Nheko.colors.alternateBase + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + Nheko.colors.alternateBase + "'>").replace("<del>", "<s>").replace("</del>", "</s>").replace("<strike>", "<s>").replace("</strike>", "</s>")
|
// table border-collapse doesn't seem to work
|
||||||
|
text: "
|
||||||
|
<style type=\"text/css\">
|
||||||
|
a { color:" + Nheko.colors.link + ";}
|
||||||
|
code { background-color: " + Nheko.colors.alternateBase + ";}
|
||||||
|
table {
|
||||||
|
border-width: 1px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
table th,
|
||||||
|
table td {
|
||||||
|
bgcolor: " + Nheko.colors.alternateBase + ";
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid " + Nheko.colors.text + ";
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + Nheko.colors.alternateBase + "'>").replace("<del>", "<s>").replace("</del>", "</s>").replace("<strike>", "<s>").replace("</strike>", "</s>")
|
||||||
width: parent ? parent.width : undefined
|
width: parent ? parent.width : undefined
|
||||||
height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : undefined
|
height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : undefined
|
||||||
clip: isReply
|
clip: isReply
|
||||||
|
|
Loading…
Reference in a new issue