Merge pull request #298 from shenlebantongying/staged

fix: reload all pages when articleview style changes
This commit is contained in:
xiaoyifang 2022-12-29 18:17:07 +08:00 committed by GitHub
commit fa591a365d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2211,14 +2211,17 @@ void MainWindow::editPreferences()
bool needReload = false;
// See if we need to reapply Qt stylesheets
if ( cfg.preferences.addonStyle != p.addonStyle || cfg.preferences.darkMode != p.darkMode)
if( cfg.preferences.darkMode != p.darkMode )
{
applyQtStyleSheet( p.addonStyle, p.darkMode );
articleMaker.setDisplayStyle( p.displayStyle, p.addonStyle );
needReload = true;
}
if (cfg.preferences.darkReaderMode != p.darkReaderMode) {
// see if we need to reapply articleview style
if( cfg.preferences.displayStyle != p.displayStyle ||
cfg.preferences.addonStyle != p.addonStyle ||
cfg.preferences.darkReaderMode != p.darkReaderMode )
{
articleMaker.setDisplayStyle( p.displayStyle, p.addonStyle );
needReload = true;
}