mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-27 07:46:17 +01:00
added new override color option for new articles, fixed regression crash from previous commit
This commit is contained in:
parent
a3a77211d0
commit
1e28d482fc
@ -7,6 +7,8 @@
|
|||||||
<palette>
|
<palette>
|
||||||
<color key="FgInteresting">#85ACF6</color>
|
<color key="FgInteresting">#85ACF6</color>
|
||||||
<color key="FgSelectedInteresting">#D9E3F7</color>
|
<color key="FgSelectedInteresting">#D9E3F7</color>
|
||||||
|
<color key="FgNewMessages">#c684f4</color>
|
||||||
|
<color key="FgSelectedNewMessages">#d3a3f4</color>
|
||||||
<color key="FgError">#DF5656</color>
|
<color key="FgError">#DF5656</color>
|
||||||
<color key="FgSelectedError">#910303</color>
|
<color key="FgSelectedError">#910303</color>
|
||||||
<color key="Allright">#44AA44</color>
|
<color key="Allright">#44AA44</color>
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
<palette>
|
<palette>
|
||||||
<color key="FgInteresting">#3A6FE4</color>
|
<color key="FgInteresting">#3A6FE4</color>
|
||||||
<color key="FgSelectedInteresting">#F0F2FC</color>
|
<color key="FgSelectedInteresting">#F0F2FC</color>
|
||||||
|
<color key="FgNewMessages">#cc39e2</color>
|
||||||
|
<color key="FgSelectedNewMessages">#d57fe2</color>
|
||||||
<color key="FgError">#E74343</color>
|
<color key="FgError">#E74343</color>
|
||||||
<color key="FgSelectedError">#FFD7D7</color>
|
<color key="FgSelectedError">#FFD7D7</color>
|
||||||
<color key="Allright">#77dd77</color>
|
<color key="Allright">#77dd77</color>
|
||||||
|
@ -12,8 +12,13 @@
|
|||||||
-->
|
-->
|
||||||
<color key="FgInteresting">#3A4EE4</color>
|
<color key="FgInteresting">#3A4EE4</color>
|
||||||
<color key="FgSelectedInteresting">#ff66cc</color>
|
<color key="FgSelectedInteresting">#ff66cc</color>
|
||||||
|
|
||||||
|
<color key="FgNewMessages">#3A4EE4</color>
|
||||||
|
<color key="FgSelectedNewMessages">#ff66cc</color>
|
||||||
|
|
||||||
<color key="FgError">#4EE43A</color>
|
<color key="FgError">#4EE43A</color>
|
||||||
<color key="FgSelectedError">#ff99ff</color>
|
<color key="FgSelectedError">#ff99ff</color>
|
||||||
|
|
||||||
<color key="Allright">#00ff99</color>
|
<color key="Allright">#00ff99</color>
|
||||||
</palette>
|
</palette>
|
||||||
</skin>
|
</skin>
|
@ -239,8 +239,9 @@ void Application::performLogging(QtMsgType type, const QMessageLogContext& conte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qApp != nullptr) {
|
||||||
qApp->displayLogMessageInDialog(console_message);
|
qApp->displayLogMessageInDialog(console_message);
|
||||||
|
}
|
||||||
if (type == QtMsgType::QtFatalMsg) {
|
if (type == QtMsgType::QtFatalMsg) {
|
||||||
qApp->exit(EXIT_FAILURE);
|
qApp->exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,6 @@ QString SkinEnums::palleteColorText(PaletteColors col) {
|
|||||||
|
|
||||||
case SkinEnums::PaletteColors::FgSelectedInteresting:
|
case SkinEnums::PaletteColors::FgSelectedInteresting:
|
||||||
return QObject::tr("interesting stuff (highlighted)");
|
return QObject::tr("interesting stuff (highlighted)");
|
||||||
;
|
|
||||||
|
|
||||||
case SkinEnums::PaletteColors::FgError:
|
case SkinEnums::PaletteColors::FgError:
|
||||||
return QObject::tr("errored items");
|
return QObject::tr("errored items");
|
||||||
@ -486,6 +485,12 @@ QString SkinEnums::palleteColorText(PaletteColors col) {
|
|||||||
case SkinEnums::PaletteColors::FgSelectedError:
|
case SkinEnums::PaletteColors::FgSelectedError:
|
||||||
return QObject::tr("errored items (highlighted)");
|
return QObject::tr("errored items (highlighted)");
|
||||||
|
|
||||||
|
case SkinEnums::PaletteColors::FgNewMessages:
|
||||||
|
return QObject::tr("items with new articles");
|
||||||
|
|
||||||
|
case SkinEnums::PaletteColors::FgSelectedNewMessages:
|
||||||
|
return QObject::tr("items with new articles (highlighted)");
|
||||||
|
|
||||||
case SkinEnums::PaletteColors::Allright:
|
case SkinEnums::PaletteColors::Allright:
|
||||||
return QObject::tr("OK-ish color");
|
return QObject::tr("OK-ish color");
|
||||||
|
|
||||||
|
@ -34,7 +34,13 @@ class SkinEnums : public QObject {
|
|||||||
FgSelectedError = 8,
|
FgSelectedError = 8,
|
||||||
|
|
||||||
// OK-ish color (background of list with test results of article filter).
|
// OK-ish color (background of list with test results of article filter).
|
||||||
Allright = 16
|
Allright = 16,
|
||||||
|
|
||||||
|
// Foreground color of items with new articles.
|
||||||
|
FgNewMessages = 32,
|
||||||
|
|
||||||
|
// Foreground color of selected items with new articles.
|
||||||
|
FgSelectedNewMessages = 64
|
||||||
};
|
};
|
||||||
|
|
||||||
static QString palleteColorText(PaletteColors col);
|
static QString palleteColorText(PaletteColors col);
|
||||||
@ -104,7 +110,6 @@ class RSSGUARD_DLLSPEC SkinFactory : public QObject {
|
|||||||
QString currentStyle() const;
|
QString currentStyle() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Loads the skin from given skin_data.
|
// Loads the skin from given skin_data.
|
||||||
void loadSkinFromData(const Skin& skin);
|
void loadSkinFromData(const Skin& skin);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ QVariant Feed::data(int column, int role) const {
|
|||||||
case HIGHLIGHTED_FOREGROUND_TITLE_ROLE:
|
case HIGHLIGHTED_FOREGROUND_TITLE_ROLE:
|
||||||
switch (status()) {
|
switch (status()) {
|
||||||
case Status::NewMessages:
|
case Status::NewMessages:
|
||||||
return qApp->skins()->currentSkin().colorForModel(SkinEnums::PaletteColors::FgSelectedInteresting);
|
return qApp->skins()->currentSkin().colorForModel(SkinEnums::PaletteColors::FgSelectedNewMessages);
|
||||||
|
|
||||||
case Status::Normal:
|
case Status::Normal:
|
||||||
if (countOfUnreadMessages() > 0) {
|
if (countOfUnreadMessages() > 0) {
|
||||||
@ -82,7 +82,7 @@ QVariant Feed::data(int column, int role) const {
|
|||||||
case Qt::ItemDataRole::ForegroundRole:
|
case Qt::ItemDataRole::ForegroundRole:
|
||||||
switch (status()) {
|
switch (status()) {
|
||||||
case Status::NewMessages:
|
case Status::NewMessages:
|
||||||
return qApp->skins()->currentSkin().colorForModel(SkinEnums::PaletteColors::FgInteresting);
|
return qApp->skins()->currentSkin().colorForModel(SkinEnums::PaletteColors::FgNewMessages);
|
||||||
|
|
||||||
case Status::Normal:
|
case Status::Normal:
|
||||||
if (countOfUnreadMessages() > 0) {
|
if (countOfUnreadMessages() > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user