Merge pull request 'For bug 69113' (#211) from feature/for-bug-69113 into develop

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/desktop-apps/pulls/211
This commit is contained in:
Oleg Kozhukharenko
2025-03-11 09:16:44 +00:00

View File

@ -220,6 +220,10 @@ void CMainWindow::applyTheme(const std::wstring& theme)
m_pMainPanel->setProperty("uithemetype", GetCurrentTheme().stype());
for (int i(m_pTabs->count()); !(--i < 0);) {
CAscTabData& _doc = *m_pTabs->panel(i)->data();
if ( _doc.isViewType(cvwtSimple) ) {
QJsonObject json{{"theme", QString::fromStdWString(theme)}, {"type", GetCurrentTheme().stype()}};
AscAppManager::sendCommandTo(m_pTabs->panel(i)->cef(), L"uitheme:changed", Utils::stringifyJson(json).toStdWString());
} else
if ( _doc.isViewType(cvwtEditor) && !_doc.closed() ) {
AscAppManager::sendCommandTo(m_pTabs->panel(i)->cef(), L"uitheme:changed", theme);
}