Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce darkreader mode white flash further by using QWebEnginePage::setBackgroundColor() (for Qt6.6.3+) #1406

Conversation

shenlebantongying
Copy link
Collaborator

@shenlebantongying shenlebantongying commented Feb 26, 2024

This bug is finally fixed
https://bugreports.qt.io/browse/QTBUG-112013
qt/qtwebengine@85bfaa5

This should ultimately eliminate the white flash in dark reader mode.

Related #357

(BTW, I am not sure what you did to reduce white flash previously at #357 (comment) which does work, but the bug still exists in Qt6.6.2 evidenced by my small demo https://github.com/SourceReviver/qtwebengine_bg_not_work .

Maybe the previous workarounds will be duplicated with this? Or they cover different phases of white flash. I don't know.)

@shenlebantongying shenlebantongying force-pushed the fix-white-flash-via-setbackground branch from 25b24ae to 9280d85 Compare February 27, 2024 06:51
QWebEnginePage::setBackgroundColor() (for Qt6.6.3+)

In previous Qt6.x versions, this function only set background once and
become invalidated if reload a page.
src/ui/articleview.cc Outdated Show resolved Hide resolved
@shenlebantongying shenlebantongying force-pushed the fix-white-flash-via-setbackground branch from fb4e65b to 50eeab3 Compare February 27, 2024 07:39
Repository owner deleted a comment from xiaoyifang Feb 27, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@xiaoyifang xiaoyifang merged commit 32391bd into xiaoyifang:staged Feb 27, 2024
12 of 13 checks passed
@shenlebantongying shenlebantongying deleted the fix-white-flash-via-setbackground branch February 27, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants