Added new color for retroshare links

This commit is contained in:
defnax 2025-06-20 22:56:04 +02:00
parent 5361bed037
commit cc3cd63477
4 changed files with 19 additions and 5 deletions

View file

@ -1127,14 +1127,14 @@ QString RetroShareLink::toHtml() const
if (!linkTitle.isEmpty()) {
html += " title=\"" + linkTitle + "\"";
}
html += ">" + niceName() + "</a>" ;
html += "style=\"color:#039bc6;\">" + niceName() + "</a>" ;
return html;
}
QString RetroShareLink::toHtmlFull() const
{
return QString("<a href=\"") + toString() + "\">" + toString() + "</a>" ;
return QString("<a href=\"") + toString() + "style=\"color:039bc6;\">" + toString() + "</a>" ;
}
QString RetroShareLink::toHtmlSize() const
@ -1152,7 +1152,8 @@ QString RetroShareLink::toHtmlSize() const
size += QString(" [%1]").arg(misc::friendlyUnit(collection.size()));
}
}
QString link = QString("<a href=\"%1\">%2</a> <font color=\"blue\">%3</font>").arg(toString()).arg(name()).arg(size);
QString link = QString("<a href=\"%1\">%2</a> <font color=\"#039bc6\">%3</font>").arg(toString()).arg(name()).arg(size);
return link;
}

View file

@ -44,6 +44,10 @@ MimeTextEdit::MimeTextEdit(QWidget *parent)
mForceCompleterShowNextKeyEvent = false;
highliter = new RsSyntaxHighlighter(this);
mOnlyPlainText = false;
QColor linkColor = QColor(3, 155, 198);
QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(linkColor.name());
document()->setDefaultStyleSheet(sheet);
}
bool MimeTextEdit::canInsertFromMimeData(const QMimeData* source) const

View file

@ -50,6 +50,10 @@ RSTextBrowser::RSTextBrowser(QWidget *parent) :
highlighter = new RsSyntaxHighlighter(this);
QColor linkColor = QColor(3, 155, 198);
QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(linkColor.name());
document()->setDefaultStyleSheet(sheet);
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
}

View file

@ -397,7 +397,7 @@
</layout>
</item>
<item>
<widget class="QTextBrowser" name="infoDescription">
<widget class="RSTextBrowser" name="infoDescription">
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@ -548,7 +548,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<widget class="QTextBrowser" name="postDetails_TE">
<widget class="RSTextBrowser" name="postDetails_TE">
<property name="openExternalLinks">
<bool>true</bool>
</property>
@ -685,6 +685,11 @@ p, li { white-space: pre-wrap; }
<header>gui/gxs/GxsCommentDialog.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../icons.qrc"/>