OtterBrowser / otter-browser

Otter Browser aims to recreate the best aspects of the classic Opera (12.x) UI using Qt5
https://otter-browser.org
GNU General Public License v3.0
1.83k stars 277 forks source link

Dark Mode #1477

Open ShalokShalom opened 6 years ago

ShalokShalom commented 6 years ago

An absolute astonishing add on for an absolute astonishing browser :D https://chrome.google.com/webstore/detail/dark-mode/dmghijelimhndkbmpgbldicpogfkceaj?hl=en

pierreporte commented 6 years ago

I think this could be achieved using already supported userscripts. A dark mode is indeed useful so it is very likely that a script is already available somewhere.

lanodan commented 6 years ago

Currently Otter has support for:

So, I think it already have everything needed.

Frenzie commented 6 years ago

A dark style that was popular a decade ago is http://usercss.ru/styles/night/

ShalokShalom commented 6 years ago

I tried several scripts and add ons and currently I am quite happy with the mentioned dark mode. What we can work on is a white list for pages who req. special treatment.

travankor commented 4 years ago

Webengine in QT5.14+ has a built in dark mode. All Otterbrowser needs is a GUI option to toggle this.

More info: https://github.com/qutebrowser/qutebrowser/issues/5394

Emdek commented 4 years ago

@travankor, interesting, but so far it's more like a hack, not a proper option, just a global toggle, and requires restart too… I'll think about that, presence of similar option for QtWebKit would really help to decide what to about it. BTW, I I understand correctly you can enable it by passing command line arguments too.

annulen commented 4 years ago

WebKit supports dark mode for a while: https://webkit.org/blog/8840/dark-mode-support-in-webkit/ However adding it would inevitably interfere with support of system palette / widget style.

Emdek commented 4 years ago

So the good news is that WK support is superior (can be simply toggled per page, even using user stylesheets), but the bad news is that it is not available in 5.212…

ShalokShalom commented 4 years ago

And not intelligent, it is just a reversing of the colors.

annulen commented 4 years ago

What "intelligent" one is supposed to do?

ShalokShalom commented 4 years ago

Analyze the website and then decide on an individual basis, like the add-on Darkreader does.

annulen commented 4 years ago

Such behavior may be acceptable for plugin but not for generic web browser. It can alter page in a ways which are not intended by page author resulting in ugly or unreadable content if some heuristic goes wrong. Imagine consequences if you are browsing site of the bank and miss important conditions because of bad text color in fine prints.

ShalokShalom commented 4 years ago

It's actually exactly the other way around. I switched to Darkreader since this seems to happen regularly with the generic methods, and not having Darkreader available - after one year of constant use - renders a Webbrowser unfeasible to me. It can change so much, not having to deal with the issue of badly inverted webpages anymore.