[win-linux] fix bug 68624

This commit is contained in:
SimplestStudio
2025-02-20 12:26:32 +02:00
parent 58392cb382
commit 38a035d6d8
3 changed files with 8 additions and 6 deletions

View File

@ -353,12 +353,11 @@ namespace CEditorTools
if ( format == AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCXF ) {
return AscEditorType::etDocumentMasterForm;
} else
if ( format == AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM_PDF ) {
if ( format == AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM_PDF ||
format == AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM ) {
return AscEditorType::etPdf;
} else
if ( (format > AVS_OFFICESTUDIO_FILE_DOCUMENT && format < AVS_OFFICESTUDIO_FILE_PRESENTATION) ||
format == AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDF || format == AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDFA ||
format == AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_DJVU )
if ( format > AVS_OFFICESTUDIO_FILE_DOCUMENT && format < AVS_OFFICESTUDIO_FILE_PRESENTATION )
return AscEditorType::etDocument;
else
if ( format > AVS_OFFICESTUDIO_FILE_PRESENTATION && format < AVS_OFFICESTUDIO_FILE_SPREADSHEET )

View File

@ -499,10 +499,10 @@ int CAscTabWidget::insertPanel(QWidget * panel, int index)
case AscEditorType::etSpreadsheet:
tabcolor = QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabCellActive));
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etDocument:
tabcolor = QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabWordActive));
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etPdf:
tabcolor = QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabViewerActive));
break;
@ -856,6 +856,7 @@ void CAscTabWidget::applyDocumentChanging(int id, int type)
m_pBar->setActiveTabColor(tabIndex,
QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabSlideActive)));
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etPdf:
panel(tabIndex)->applyLoader("loader:style", "pdf");
m_pBar->setActiveTabColor(tabIndex,
@ -1277,10 +1278,10 @@ void CAscTabWidget::applyUITheme(const std::wstring& theme)
case AscEditorType::etSpreadsheet:
m_pBar->setActiveTabColor(i, tab_color.at(1));
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etDocument:
m_pBar->setActiveTabColor(i, tab_color.at(0));
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etPdf:
m_pBar->setActiveTabColor(i, QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabViewerActive)));
break;

View File

@ -72,6 +72,7 @@ auto prepare_editor_css(AscEditorType type, const CTheme& theme) -> QString {
case AscEditorType::etDocument: c = theme.value(CTheme::ColorRole::ecrTabWordActive); break;
case AscEditorType::etPresentation: c = theme.value(CTheme::ColorRole::ecrTabSlideActive); break;
case AscEditorType::etSpreadsheet: c = theme.value(CTheme::ColorRole::ecrTabCellActive); break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etPdf: c = theme.value(CTheme::ColorRole::ecrTabViewerActive); break;
case AscEditorType::etDraw: c = theme.value(CTheme::ColorRole::ecrTabDrawActive); break;
}
@ -504,6 +505,7 @@ public:
background = GetColorValueByRole(ecrTabCellActive);
border = background;
break;
case AscEditorType::etDocumentMasterForm:
case AscEditorType::etPdf:
background = GetColorValueByRole(ecrTabViewerActive);
border = background;