diff --git a/src/librssguard-standard/src/standardfeed.cpp b/src/librssguard-standard/src/standardfeed.cpp
index 1ddd9b745..fb0da2b8c 100644
--- a/src/librssguard-standard/src/standardfeed.cpp
+++ b/src/librssguard-standard/src/standardfeed.cpp
@@ -97,6 +97,7 @@ QString StandardFeed::additionalTooltip() const {
"Active message filters: %2\n"
"Status: %3\n"
"Source: %4\n"
+ "HTTP/2: %6\n"
"Item ID: %5\n")
.arg(getAutoUpdateStatusDescription(),
filters.size() > 0 ? QSL("%1 (%2)").arg(QString::number(filters.size()), fltrs.join(QSL(", ")))
@@ -104,7 +105,8 @@ QString StandardFeed::additionalTooltip() const {
stat,
m_sourceType == SourceType::Url ? QString("%1").arg(source().left(100))
: source().left(100),
- customId());
+ customId(),
+ getHttpDescription());
return base_tooltip + tr("Encoding: %1\n"
"Type: %2\n"
@@ -468,6 +470,19 @@ bool StandardFeed::removeItself() {
return DatabaseQueries::deleteFeed(database, this, getParentServiceRoot()->accountId());
}
+QString StandardFeed::getHttpDescription() const {
+ switch (m_http2Status) {
+ case NetworkFactory::Http2Status::DontSet:
+ return tr("uses application setting");
+
+ case NetworkFactory::Http2Status::Enabled:
+ return tr("enabled");
+
+ case NetworkFactory::Http2Status::Disabled:
+ return tr("disabled");
+ }
+}
+
QVariantHash StandardFeed::httpHeaders() const {
return m_httpHeaders;
}
diff --git a/src/librssguard-standard/src/standardfeed.h b/src/librssguard-standard/src/standardfeed.h
index d1ac4a175..e506c4288 100644
--- a/src/librssguard-standard/src/standardfeed.h
+++ b/src/librssguard-standard/src/standardfeed.h
@@ -134,6 +134,8 @@ class StandardFeed : public Feed {
StandardServiceRoot* serviceRoot() const;
bool removeItself();
+ QString getHttpDescription() const;
+
private:
SourceType m_sourceType;
Type m_type;
diff --git a/src/librssguard/gui/dialogs/formmain.cpp b/src/librssguard/gui/dialogs/formmain.cpp
index bbee34d7a..86522a9ae 100644
--- a/src/librssguard/gui/dialogs/formmain.cpp
+++ b/src/librssguard/gui/dialogs/formmain.cpp
@@ -663,6 +663,7 @@ void FormMain::setupIcons() {
m_ui->m_actionBrowserScrollUp->setIcon(icon_theme_factory->fromTheme(QSL("arrow-up")));
m_ui->m_actionBrowserScrollDown->setIcon(icon_theme_factory->fromTheme(QSL("arrow-down")));
m_ui->m_actionCleanupWebCache->setIcon(icon_theme_factory->fromTheme(QSL("edit-clear")));
+ m_ui->m_actionReloadSkin->setIcon(icon_theme_factory->fromTheme(QSL("view-refresh")));
// Setup icons on TabWidget too.
m_ui->m_tabWidget->setupIcons();
@@ -794,6 +795,8 @@ void FormMain::createConnections() {
m_ui->m_menuTools->removeAction(m_ui->m_actionCleanupWebCache);
#endif
+ connect(m_ui->m_actionReloadSkin, &QAction::triggered, qApp, &Application::reloadCurrentSkin);
+
// Menu "Help" connections.
connect(m_ui->m_actionAboutGuard, &QAction::triggered, this, [this]() {
FormAbout(false, this).exec();
diff --git a/src/librssguard/gui/dialogs/formmain.ui b/src/librssguard/gui/dialogs/formmain.ui
index 6a67d38cc..984074df1 100644
--- a/src/librssguard/gui/dialogs/formmain.ui
+++ b/src/librssguard/gui/dialogs/formmain.ui
@@ -96,6 +96,7 @@
+
@@ -966,6 +967,11 @@
&Purge selected feeds
+
+
+ Reload &skin
+
+
diff --git a/src/librssguard/miscellaneous/application.cpp b/src/librssguard/miscellaneous/application.cpp
index 3a924dade..d55a699ee 100644
--- a/src/librssguard/miscellaneous/application.cpp
+++ b/src/librssguard/miscellaneous/application.cpp
@@ -174,7 +174,8 @@ Application::Application(const QString& id, int& argc, char** argv, const QStrin
// and skin.
m_icons->setupSearchPaths();
m_icons->loadCurrentIconTheme();
- m_skins->loadCurrentSkin(usingLite());
+
+ reloadCurrentSkin(false);
if (m_toastNotifications != nullptr) {
connect(m_toastNotifications,
@@ -1194,6 +1195,10 @@ void Application::onAdBlockFailure() {
qApp->settings()->setValue(GROUP(AdBlock), AdBlock::AdBlockEnabled, false);
}
+void Application::reloadCurrentSkin(bool replace_existing_qss) {
+ m_skins->loadCurrentSkin(usingLite(), replace_existing_qss);
+}
+
void Application::determineFirstRuns() {
m_firstRunEver = settings()->value(GROUP(General), SETTING(General::FirstRun)).toBool();
m_firstRunCurrentVersion =
diff --git a/src/librssguard/miscellaneous/application.h b/src/librssguard/miscellaneous/application.h
index 87a401535..233745b04 100644
--- a/src/librssguard/miscellaneous/application.h
+++ b/src/librssguard/miscellaneous/application.h
@@ -203,6 +203,8 @@ class RSSGUARD_DLLSPEC Application : public SingleApplication {
// Restarts the application.
void restart();
+ void reloadCurrentSkin(bool replace_existing_qss = true);
+
// Processes incoming message from another RSS Guard instance.
void parseCmdArgumentsFromOtherInstance(const QString& message);
void parseCmdArgumentsFromMyInstance(const QStringList& raw_cli_args, QString& custom_ua);
diff --git a/src/librssguard/miscellaneous/skinfactory.cpp b/src/librssguard/miscellaneous/skinfactory.cpp
index 906ef5679..154572c95 100644
--- a/src/librssguard/miscellaneous/skinfactory.cpp
+++ b/src/librssguard/miscellaneous/skinfactory.cpp
@@ -23,7 +23,7 @@
SkinFactory::SkinFactory(QObject* parent) : QObject(parent), m_styleIsFrozen(false), m_useSkinColors(false) {}
-void SkinFactory::loadCurrentSkin(bool lite) {
+void SkinFactory::loadCurrentSkin(bool lite, bool replace_existing_qss) {
QList skin_names_to_try = {selectedSkinName(), QSL(APP_SKIN_DEFAULT)};
bool skin_parsed;
Skin skin_data;
@@ -34,7 +34,7 @@ void SkinFactory::loadCurrentSkin(bool lite) {
skin_data = skinInfo(skin_name, lite, &skin_parsed);
if (skin_parsed) {
- loadSkinFromData(skin_data);
+ loadSkinFromData(skin_data, replace_existing_qss);
// Set this 'Skin' object as active one.
m_currentSkin = skin_data;
@@ -109,7 +109,7 @@ QPalette qt_fusionPalette(bool dark_appearance) {
return fusion_palette;
}
-void SkinFactory::loadSkinFromData(const Skin& skin) {
+void SkinFactory::loadSkinFromData(const Skin& skin, bool replace_existing_qss) {
#if QT_VERSION >= 0x060500 // Qt >= 6.5.0
auto system_color_scheme = qApp->styleHints()->colorScheme();
@@ -207,7 +207,12 @@ void SkinFactory::loadSkinFromData(const Skin& skin) {
}
}
- qss_to_set = qApp->styleSheet() + QSL("\r\n") + qss_to_set;
+ if (replace_existing_qss) {
+ qss_to_set = qss_to_set;
+ }
+ else {
+ qss_to_set = qApp->styleSheet() + QSL("\r\n") + qss_to_set;
+ }
qApp->setStyleSheet(qss_to_set);
}
@@ -292,21 +297,21 @@ PreparedHtml SkinFactory::generateHtmlOfArticles(const QList& messages,
msg_contents = qApp->web()->limitSizeOfHtmlImages(msg_contents, desired_width, forced_img_height);
}
- messages_layout
- .append(single_message_layout.arg(message.m_title,
- tr("Written by ") +
- (message.m_author.isEmpty() ? tr("unknown author") : message.m_author),
- message.m_url,
- msg_contents,
- msg_date,
- enclosures,
- enclosure_images,
- QString::number(message.m_id),
- (message.m_rtlBehavior == RtlBehavior::Everywhere ||
- message.m_rtlBehavior == RtlBehavior::EverywhereExceptFeedList ||
- message.m_rtlBehavior == RtlBehavior::OnlyViewer)
- ? QSL("rtl")
- : QSL("ltr")));
+ messages_layout.append(single_message_layout.arg(message.m_title,
+ tr("Written by ") + (message.m_author.isEmpty()
+ ? tr("unknown author")
+ : message.m_author),
+ message.m_url,
+ msg_contents,
+ msg_date,
+ enclosures,
+ enclosure_images,
+ QString::number(message.m_id),
+ (message.m_rtlBehavior == RtlBehavior::Everywhere ||
+ message.m_rtlBehavior == RtlBehavior::EverywhereExceptFeedList ||
+ message.m_rtlBehavior == RtlBehavior::OnlyViewer)
+ ? QSL("rtl")
+ : QSL("ltr")));
}
QString msg_contents =
diff --git a/src/librssguard/miscellaneous/skinfactory.h b/src/librssguard/miscellaneous/skinfactory.h
index fa0b9fafd..d0af30d2c 100644
--- a/src/librssguard/miscellaneous/skinfactory.h
+++ b/src/librssguard/miscellaneous/skinfactory.h
@@ -90,7 +90,7 @@ class RSSGUARD_DLLSPEC SkinFactory : public QObject {
virtual ~SkinFactory() = default;
// Loads skin name from settings and sets it as active.
- void loadCurrentSkin(bool lite);
+ void loadCurrentSkin(bool lite, bool replace_existing_qss);
Skin currentSkin() const;
// Gets color for model from active skin.
@@ -122,7 +122,7 @@ class RSSGUARD_DLLSPEC SkinFactory : public QObject {
private:
// Loads the skin from given skin_data.
- void loadSkinFromData(const Skin& skin);
+ void loadSkinFromData(const Skin& skin, bool replace_existing_qss);
QString loadSkinFile(const QString& skin_folder,
bool lite,