mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-09-06 11:22:24 +08:00
https://github.com/qutebrowser/qutebrowser/issues/4840 启动时判断 DTK 主题颜色,QTWEBENGINE_CHROMIUM_FLAGS 环境变量添加 --blink-settings=preferredColorScheme=0 启用深色模式(或 --force-dark-mode)(Qt >= 5.14,当前仅 Deepin 支持) Log: 支持启动时识别 DTK 主题颜色,判断网页是否需要显示为深色模式
21 lines
385 B
C++
21 lines
385 B
C++
#ifndef WEBENGINEVIEW_H
|
|
#define WEBENGINEVIEW_H
|
|
|
|
#include <QWebEngineView>
|
|
|
|
// class WebEngineUrlRequestInterceptor;
|
|
class WebEngineView : public QWebEngineView
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit WebEngineView(QWidget *parent = nullptr);
|
|
|
|
static void handleChromiumFlags();
|
|
|
|
private:
|
|
// WebEngineUrlRequestInterceptor *interceptor = nullptr;
|
|
};
|
|
|
|
#endif // WEBENGINEVIEW_H
|