mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
[win-nix] fix cefview's background color
This commit is contained in:
@ -855,6 +855,8 @@ CMainWindow * CAscApplicationManagerWrapper::prepareMainWindow(const QRect& r)
|
||||
QPointer<QCefView> _startPanel = AscAppManager::createViewer(nullptr, CWindowBase::expectedContentSize(_start_rect));
|
||||
_startPanel->Create(&_app, cvwtSimple);
|
||||
_startPanel->setObjectName("startPanel");
|
||||
QColor c = m_themes.current().color(CTheme::ColorRole::ecrWindowBackground);
|
||||
_startPanel->SetBackgroundCefColor(uchar(c.red()), uchar(c.green()), uchar(c.blue()));
|
||||
//_startPanel->resize(_start_rect.width(), _start_rect.height());
|
||||
|
||||
CMainWindow * _window = static_cast<CMainWindow*>(new CMainWindowImpl(_start_rect));
|
||||
|
||||
@ -10,12 +10,18 @@ using namespace NSEditorApi;
|
||||
|
||||
CTabPanel * CTabPanel::createEditorPanel(QWidget *parent, const QSize& s)
|
||||
{
|
||||
CTabPanel * panel = new CTabPanel(parent, s);
|
||||
QColor c = AscAppManager::themes().current().color(CTheme::ColorRole::ecrWindowBackground);
|
||||
CTabPanel * panel = new CTabPanel(parent, s, c);
|
||||
panel->initAsEditor();
|
||||
return panel;
|
||||
}
|
||||
|
||||
CTabPanel::CTabPanel(QWidget *parent, const QSize& s)
|
||||
: CTabPanel(parent, s, QColor(244,244,244))
|
||||
{
|
||||
}
|
||||
|
||||
CTabPanel::CTabPanel(QWidget *parent, const QSize& s, const QColor& c)
|
||||
: QWidget(parent)
|
||||
, m_pViewer(AscAppManager::createViewer(this, s))
|
||||
{
|
||||
@ -25,7 +31,7 @@ CTabPanel::CTabPanel(QWidget *parent, const QSize& s)
|
||||
_layout->addWidget(m_pViewer);
|
||||
setLayout(_layout);
|
||||
m_pViewer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
m_pViewer->SetBackgroundCefColor(244, 244, 244);
|
||||
m_pViewer->SetBackgroundCefColor(uchar(c.red()), uchar(c.green()), uchar(c.blue()));
|
||||
|
||||
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||
setAttribute(Qt::WA_NativeWindow);
|
||||
|
||||
@ -13,6 +13,7 @@ class CTabPanel : public QWidget
|
||||
|
||||
public:
|
||||
explicit CTabPanel(QWidget *parent, const QSize& s);
|
||||
explicit CTabPanel(QWidget *parent, const QSize& s, const QColor& c);
|
||||
~CTabPanel();
|
||||
|
||||
static CTabPanel * createEditorPanel(QWidget *parent, const QSize& size);
|
||||
|
||||
Reference in New Issue
Block a user