mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
Added new color for retroshare links
This commit is contained in:
parent
5361bed037
commit
cc3cd63477
4 changed files with 19 additions and 5 deletions
|
@ -1127,14 +1127,14 @@ QString RetroShareLink::toHtml() const
|
||||||
if (!linkTitle.isEmpty()) {
|
if (!linkTitle.isEmpty()) {
|
||||||
html += " title=\"" + linkTitle + "\"";
|
html += " title=\"" + linkTitle + "\"";
|
||||||
}
|
}
|
||||||
html += ">" + niceName() + "</a>" ;
|
html += "style=\"color:#039bc6;\">" + niceName() + "</a>" ;
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RetroShareLink::toHtmlFull() const
|
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
|
QString RetroShareLink::toHtmlSize() const
|
||||||
|
@ -1152,7 +1152,8 @@ QString RetroShareLink::toHtmlSize() const
|
||||||
size += QString(" [%1]").arg(misc::friendlyUnit(collection.size()));
|
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;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,10 @@ MimeTextEdit::MimeTextEdit(QWidget *parent)
|
||||||
mForceCompleterShowNextKeyEvent = false;
|
mForceCompleterShowNextKeyEvent = false;
|
||||||
highliter = new RsSyntaxHighlighter(this);
|
highliter = new RsSyntaxHighlighter(this);
|
||||||
mOnlyPlainText = false;
|
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
|
bool MimeTextEdit::canInsertFromMimeData(const QMimeData* source) const
|
||||||
|
|
|
@ -50,6 +50,10 @@ RSTextBrowser::RSTextBrowser(QWidget *parent) :
|
||||||
|
|
||||||
highlighter = new RsSyntaxHighlighter(this);
|
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)));
|
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="infoDescription">
|
<widget class="RSTextBrowser" name="infoDescription">
|
||||||
<property name="html">
|
<property name="html">
|
||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
@ -548,7 +548,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="postDetails_TE">
|
<widget class="RSTextBrowser" name="postDetails_TE">
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -685,6 +685,11 @@ p, li { white-space: pre-wrap; }
|
||||||
<header>gui/gxs/GxsCommentDialog.h</header>
|
<header>gui/gxs/GxsCommentDialog.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>RSTextBrowser</class>
|
||||||
|
<extends>QTextBrowser</extends>
|
||||||
|
<header>gui/common/RSTextBrowser.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../icons.qrc"/>
|
<include location="../icons.qrc"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue