feat: 支持启动时识别 DTK 主题颜色,判断网页是否需要显示为深色模式(切换 DTK 主题后重启生效,不支持实时生效)

https://github.com/qutebrowser/qutebrowser/issues/4840
启动时判断 DTK 主题颜色,QTWEBENGINE_CHROMIUM_FLAGS 环境变量添加 --blink-settings=preferredColorScheme=0 启用深色模式(或 --force-dark-mode)(Qt >= 5.14,当前仅 Deepin 支持)

Log: 支持启动时识别 DTK 主题颜色,判断网页是否需要显示为深色模式
This commit is contained in:
zty199
2022-11-20 23:55:52 +08:00
parent c6b6734c9e
commit 6b25b50696
5 changed files with 125 additions and 37 deletions

View File

@@ -11,6 +11,8 @@ class WebEngineView : public QWebEngineView
public:
explicit WebEngineView(QWidget *parent = nullptr);
static void handleChromiumFlags();
private:
// WebEngineUrlRequestInterceptor *interceptor = nullptr;
};