GUI Webengine result list: load the header css so that the initial page uses the right background color

This commit is contained in:
Jean-Francois Dockes 2020-08-14 15:32:57 +02:00
parent 9cba5a3880
commit ff722de81a

View File

@ -370,6 +370,7 @@ ResList::ResList(QWidget* parent, const char* name)
m_pager = new QtGuiResListPager(this, prefs.respagesize, prefs.alwaysSnippets); m_pager = new QtGuiResListPager(this, prefs.respagesize, prefs.alwaysSnippets);
m_pager->setHighLighter(&g_hiliter); m_pager->setHighLighter(&g_hiliter);
resetView();
} }
ResList::~ResList() ResList::~ResList()
@ -509,7 +510,10 @@ void ResList::resetView()
// blank. Else, there are often icons or text left around // blank. Else, there are often icons or text left around
#if defined(USING_WEBKIT) || defined(USING_WEBENGINE) #if defined(USING_WEBKIT) || defined(USING_WEBENGINE)
m_text = ""; m_text = "";
setHtml("<html><body></body></html>"); QString html("<html><head>");
html += u8s2qs(m_pager->headerContent()) + "</head>";
html += "<body></body></html>";
setHtml(html);
#else #else
m_pageParaToReldocnums.clear(); m_pageParaToReldocnums.clear();
clear(); clear();