mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 18:45:17 -04:00
Greentext color is defined in stylesheet, and can be overridden with qss files
This commit is contained in:
parent
bc4691ceb4
commit
e2c40d6693
6 changed files with 32 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
RsSyntaxHighlighter::RsSyntaxHighlighter(QTextEdit *parent)
|
||||
: QSyntaxHighlighter(parent)
|
||||
{
|
||||
quotationFormat.setForeground(QColor(120,153,34));
|
||||
|
||||
}
|
||||
|
||||
void RsSyntaxHighlighter::highlightBlock(const QString &text)
|
||||
|
@ -26,6 +26,12 @@ void RsSyntaxHighlighter::highlightBlock(const QString &text)
|
|||
}
|
||||
}
|
||||
|
||||
void RsSyntaxHighlighter::setTextColorQuote(QColor textColorQuote)
|
||||
{
|
||||
quotationFormat.setForeground(textColorQuote);
|
||||
this->rehighlight();
|
||||
}
|
||||
|
||||
//Dumping the raw unicode string into the console in Base64 encoding
|
||||
/*
|
||||
QByteArray uniline;
|
||||
|
|
|
@ -9,8 +9,11 @@ class RsSyntaxHighlighter : public QSyntaxHighlighter
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QColor textColorQuote READ textColorQuote WRITE setTextColorQuote)
|
||||
|
||||
public:
|
||||
RsSyntaxHighlighter(QTextEdit *parent = 0);
|
||||
QColor textColorQuote() const { return quotationFormat.foreground().color(); };
|
||||
|
||||
protected:
|
||||
void highlightBlock(const QString &text);
|
||||
|
@ -21,6 +24,8 @@ private:
|
|||
signals:
|
||||
|
||||
public slots:
|
||||
void setTextColorQuote(QColor textColorQuote);
|
||||
|
||||
};
|
||||
|
||||
#endif // RSSYNTAXHIGHLIGHTER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue