mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix: articleview style switching
This commit is contained in:
parent
43859df431
commit
7daf9b4e56
|
@ -2211,14 +2211,17 @@ void MainWindow::editPreferences()
|
||||||
bool needReload = false;
|
bool needReload = false;
|
||||||
|
|
||||||
// See if we need to reapply Qt stylesheets
|
// 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 );
|
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;
|
needReload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue