This commit is contained in:
Martin Rotter 2020-10-27 08:24:41 +01:00
parent 670235e37e
commit ea8ec86abd
6 changed files with 12 additions and 8 deletions

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0.03">
<skin version="0.04">
<author>
<name>Martin Rotter</name>
<email>rotter.martinos@gmail.com</email>
</author>
<palette>
<color key="1">#FFA07A</color>
<color key="1">#7ae2ff</color>
<color key="2">#f08f84</color>
</palette>
</skin>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0.22">
<skin version="0.23">
<author>
<name>Martin Rotter</name>
<email>rotter.martinos@gmail.com</email>
</author>
<palette>
<color key="1">#4891F0</color>
<color key="1">#4861f0</color>
<color key="2">#d93636</color>
</palette>
</skin>

View File

@ -12,7 +12,8 @@
struct RSSGUARD_DLLSPEC Skin {
enum class PaletteColors {
Highlight = 1
Highlight = 1,
Error = 2
};
QString m_baseName;
@ -26,7 +27,6 @@ struct RSSGUARD_DLLSPEC Skin {
QString m_enclosureImageMarkup;
QString m_layoutMarkup;
QString m_enclosureMarkup;
QHash<Skin::PaletteColors, QColor> m_colorPalette;
};

View File

@ -71,13 +71,13 @@ QVariant Feed::data(int column, int role) const {
case Qt::ForegroundRole:
switch (status()) {
case Status::NewMessages:
return QColor(Qt::blue);
return qApp->skins()->currentSkin().m_colorPalette[Skin::PaletteColors::Highlight];
case Status::NetworkError:
case Status::ParsingError:
case Status::AuthError:
case Status::OtherError:
return QColor(Qt::red);
return qApp->skins()->currentSkin().m_colorPalette[Skin::PaletteColors::Error];
default:
return QVariant();

View File

@ -10,6 +10,7 @@
class RSSGUARD_DLLSPEC Label : public RootItem {
Q_OBJECT
// Added for message filtering with labels.
Q_PROPERTY(QString customId READ customId)
Q_PROPERTY(QColor color READ color)

View File

@ -21,6 +21,7 @@ class QAction;
class RSSGUARD_DLLSPEC RootItem : public QObject {
Q_OBJECT
// Added for message filtering with labels.
Q_PROPERTY(QString title READ title)
public: