From 7d7ee4140d42613886f8b84a46535d9ba5148800 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Wed, 19 Jan 2022 08:22:26 +0100 Subject: [PATCH] re-introduce Google S2 favicon service to icon fetching mechanism --- .../desktop/com.github.rssguard.appdata.xml | 2 +- src/librssguard/miscellaneous/skinfactory.cpp | 61 +++++++++---------- .../network-web/networkfactory.cpp | 46 ++++++++------ 3 files changed, 58 insertions(+), 51 deletions(-) diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml index e535c0821..bc92aef68 100644 --- a/resources/desktop/com.github.rssguard.appdata.xml +++ b/resources/desktop/com.github.rssguard.appdata.xml @@ -26,7 +26,7 @@ https://github.com/sponsors/martinrotter - + none diff --git a/src/librssguard/miscellaneous/skinfactory.cpp b/src/librssguard/miscellaneous/skinfactory.cpp index d06929087..c8ee4bbf3 100644 --- a/src/librssguard/miscellaneous/skinfactory.cpp +++ b/src/librssguard/miscellaneous/skinfactory.cpp @@ -17,10 +17,7 @@ SkinFactory::SkinFactory(QObject* parent) : QObject(parent) {} void SkinFactory::loadCurrentSkin() { - QList skin_names_to_try; - - skin_names_to_try.append(selectedSkinName()); - skin_names_to_try.append(QSL(APP_SKIN_DEFAULT)); + QList skin_names_to_try = { selectedSkinName(), QSL(APP_SKIN_DEFAULT) }; bool skin_parsed; Skin skin_data; QString skin_name; @@ -85,23 +82,23 @@ void SkinFactory::loadSkinFromData(const Skin& skin) { // // Backgrounds & bases. - fusion_palette.setColor(QPalette::ColorRole::Window, clr_maibg); - fusion_palette.setColor(QPalette::ColorRole::Base, clr_basbg); - fusion_palette.setColor(QPalette::ColorRole::Dark, clr_brdbg); + fusion_palette.setColor(QPalette::ColorRole::Window, clr_maibg); + fusion_palette.setColor(QPalette::ColorRole::Base, clr_basbg); + fusion_palette.setColor(QPalette::ColorRole::Dark, clr_brdbg); fusion_palette.setColor(QPalette::ColorRole::AlternateBase, clr_altbg); - fusion_palette.setColor(QPalette::ColorRole::Button, clr_altbg); - fusion_palette.setColor(QPalette::ColorRole::Light, clr_altbg); // Bright - fusion_palette.setColor(QPalette::ColorRole::Highlight, clr_selbg); + fusion_palette.setColor(QPalette::ColorRole::Button, clr_altbg); + fusion_palette.setColor(QPalette::ColorRole::Light, clr_altbg); // Bright + fusion_palette.setColor(QPalette::ColorRole::Highlight, clr_selbg); // Texts. - fusion_palette.setColor(QPalette::ColorRole::ButtonText, clr_btnfg); - fusion_palette.setColor(QPalette::ColorRole::WindowText, clr_winfg); - fusion_palette.setColor(QPalette::ColorRole::BrightText, clr_basbg); - fusion_palette.setColor(QPalette::ColorRole::Text, clr_winfg); // Normal text - fusion_palette.setColor(QPalette::ColorRole::PlaceholderText, clr_dibfg); - fusion_palette.setColor(QPalette::ColorRole::Link, clr_wlink); - fusion_palette.setColor(QPalette::ColorRole::LinkVisited, clr_wlink); - fusion_palette.setColor(QPalette::ColorRole::HighlightedText, clr_selfg); + fusion_palette.setColor(QPalette::ColorRole::ButtonText, clr_btnfg); + fusion_palette.setColor(QPalette::ColorRole::WindowText, clr_winfg); + fusion_palette.setColor(QPalette::ColorRole::BrightText, clr_basbg); + fusion_palette.setColor(QPalette::ColorRole::Text, clr_winfg); // Normal text + fusion_palette.setColor(QPalette::ColorRole::PlaceholderText, clr_dibfg); + fusion_palette.setColor(QPalette::ColorRole::Link, clr_wlink); + fusion_palette.setColor(QPalette::ColorRole::LinkVisited, clr_wlink); + fusion_palette.setColor(QPalette::ColorRole::HighlightedText, clr_selfg); // // Inactive state. @@ -116,23 +113,23 @@ void SkinFactory::loadSkinFromData(const Skin& skin) { // // Backgrounds & bases. - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Window, clr_maibg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Base, clr_basbg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Dark, clr_brdbg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Window, clr_maibg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Base, clr_basbg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Dark, clr_brdbg); fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::AlternateBase, clr_altbg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Button, clr_altbg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Light, clr_altbg); // Bright - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Highlight, clr_selbg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Button, clr_altbg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Light, clr_altbg); // Bright + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Highlight, clr_selbg); // Texts. - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ButtonText, clr_dibfg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::WindowText, clr_diwfg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::BrightText, clr_basbg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Text, clr_diwfg); // Normal text - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::PlaceholderText, clr_dibfg); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Link, clr_wlink); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::LinkVisited, clr_wlink); - fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::HighlightedText, clr_selfg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::ButtonText, clr_dibfg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::WindowText, clr_diwfg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::BrightText, clr_basbg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Text, clr_diwfg); // Normal text + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::PlaceholderText, clr_dibfg); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::Link, clr_wlink); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::LinkVisited, clr_wlink); + fusion_palette.setColor(QPalette::ColorGroup::Disabled, QPalette::ColorRole::HighlightedText, clr_selfg); // // Tooltips. diff --git a/src/librssguard/network-web/networkfactory.cpp b/src/librssguard/network-web/networkfactory.cpp index 76e107c89..8c7d308d6 100644 --- a/src/librssguard/network-web/networkfactory.cpp +++ b/src/librssguard/network-web/networkfactory.cpp @@ -183,8 +183,9 @@ QNetworkReply::NetworkError NetworkFactory::downloadIcon(const QList