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

colors.webpage.preferred_color_scheme ain't working #8187

Closed
goyalyashpal opened this issue May 4, 2024 · 2 comments
Closed

colors.webpage.preferred_color_scheme ain't working #8187

goyalyashpal opened this issue May 4, 2024 · 2 comments

Comments

@goyalyashpal
Copy link

  • colors.webpage.prefers_color_scheme_dark which asks the page for a dark stylesheet, so the page will need to provide a dark CSS (requires QtWebEngine, Qt 5.14 and a restart after setting)

it ain't working.
the documentation website (local) made using sphinx with shibuya theme (which does have 3 modes: system, force light, force dark) - stays in light mode despite changing the system theme and qute restart.

the system mode of website is working well in normal browsers.

i have removed the config.py before doing all these restarts etc, and here's the autoconfig.yaml:

(i am not setting the setting as it's (supposed to be) at auto by default, which means follow system which is what i need
https://qutebrowser.org/doc/help/settings.html#colors.webpage.preferred_color_scheme)

$ ls "$APPDATA"/qutebrowser/config/
autoconfig.yml  bookmarks  greasemonkey  quickmarks

$ bat -pP "$APPDATA"/qutebrowser/config/autoconfig.yml
# If a config.py file exists, this file is ignored unless it's explicitly loaded
# via config.load_autoconfig(). For more information, see:
# https://github.com/qutebrowser/qutebrowser/blob/main/doc/help/configuring.asciidoc#loading-autoconfigyml
# DO NOT edit this file by hand, qutebrowser will overwrite it.
# Instead, create a config.py - see :help for details.

config_version: 2
settings:
  auto_save.session:
    global: true
  qt.highdpi:
    global: true
qutebrowser v3.1.0
Backend: QtWebEngine 6.6.1, based on Chromium 112.0.5615.213 (from api)
Qt: 6.6.1

CPython: 3.12.0
PyQt: 6.6.1

also, there's no qutebrowser.exe --version on cli?

Originally posted by @goyalyashpal in #5733 (comment)

@goyalyashpal
Copy link
Author

goyalyashpal commented May 4, 2024

> qutebrowser --temp-basedir

it opens with duck duck go light theme - despite system being in dark mode

:set colors.webpage.preferred_color_scheme
" see it's set to auto

:set colors.webpage.preferred_color_scheme auto
:restart
" explicitly set it to auto, still no change

:set colors.webpage.preferred_color_scheme dark
:restart
" explicitly set to dark, webpage succesfully loads in a dark theeme

:qa
" quit all

@The-Compiler
Copy link
Member

The auto setting is handled by the underlying QtWebEngine/Chromium, not qutebrowser itself.

I'm assuming you're on Windows from you mentioning qutebrowser.exe? It looks like this is already fixed in Qt 6.7 from a quick test - I can only reproduce with Qt 6.6. qutebrowser v3.2.0 with Qt 6.7 should be released once the issue in #8175 is fixed.

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

No branches or pull requests

2 participants