This commit is contained in:
defnax 2025-07-13 15:06:55 +02:00 committed by GitHub
commit 2b2899e0cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 30 additions and 11 deletions

View file

@ -236,7 +236,7 @@ void BoardPostDisplayWidgetBase::baseSetup()
{
QString siteurl = url.toEncoded();
label->setStyleSheet("text-decoration: underline; color:#2255AA;");
label->setStyleSheet("text-decoration: underline; color:#039bc6;");
label->setCursor(QCursor(Qt::PointingHandCursor));
label->setToolTip(siteurl);

View file

@ -231,12 +231,12 @@ void PostedCardView::fill()
{
QString urlstr = QString("<a href=\"");
urlstr += QString(url.toEncoded());
urlstr += QString("\" ><span style=\" text-decoration: underline; color:#2255AA;\"> ");
urlstr += QString("\" ><span style=\" text-decoration: underline; color:#039bc6;\"> ");
urlstr += messageName();
urlstr += QString(" </span></a>");
QString siteurl = url.toEncoded();
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#0079d3;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#039bc6;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
ui->titleLabel->setText(urlstr);
}else

View file

@ -548,12 +548,12 @@ void PostedItem::fill()
{
urlstr = QString("<a href=\"");
urlstr += QString(url.toEncoded());
urlstr += QString("\" ><span style=\" text-decoration: underline; color:#2255AA;\"> ");
urlstr += QString("\" ><span style=\" text-decoration: underline; color:#039bc6;\"> ");
urlstr += messageName();
urlstr += QString(" </span></a>");
QString siteurl = url.toEncoded();
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#0079d3;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
sitestr = QString("<a href=\"%1\" ><span style=\" text-decoration: underline; color:#039bc6;\"> %2 </span></a>").arg(siteurl).arg(siteurl);
ui->titleLabel->setText(urlstr);
}else

View file

@ -46,7 +46,7 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QTextBrowser" name="trans_Description">
<widget class="RSTextBrowser" name="trans_Description">
<property name="styleSheet">
<string notr="true"/>
</property>
@ -619,6 +619,11 @@ p, li { white-space: pre-wrap; }
<header>gui/common/RSTabWidget.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"/>

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"/>