-
Notifications
You must be signed in to change notification settings - Fork 105
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
feature: darkmode ,darkreader,custom style refinement #339
Comments
@shenlebantongying can you check on this |
On Linux, we shouldn't override UI's background & text colour. It looks insanely good if users choose to use a global theme that is comfortable for reading. On windows, I have a better idea: let the user choose an arbitrary background colour rather than yellow only. It will override both article's background and the side panels' background colour. The article display style will only change the style of the widgets. Pro: Satisfy all users If the dark mode is enabled, then the side panel's background colour overriding will be disabled. If the dark reader mode is enabled, then the article view's background colour overriding will be disabled. Some extra thoughts from serious Windows users maybe help. |
I think we should not grant users too much options.
currently we have about 6 custom styles , if implemented the above feature ,we should have too much styles .
on Windows ,this is much better. and dark reader mode can be remove . it should be enabled together with darkmode. on Linux/Macos, darkreaer can be enabled automaticly when the system has enabled the dark mode.
|
We shouldn't use the The white text on the black background will become blurry for them. Using dark UI and light text in article view is a possible use case. https://www.google.com/search?q=accessibility+light+text+on+dark+background |
then ,on linux, just keep the dark reader mode. Let's users to choose .
If the dark reader mode is not enabled ,the application's custom style should be enabled. |
To prevent dark reader mode from messing with the yellow background, We can simply append However, the "correct" solution is just one step away from using arbitrary background colour: We will remove |
in screenshot ,the darkmode has not been enabled , a custom style has been choosen. I think 587aad1 can be reverted and make some minor changes to satisfy the custom style. if custom style+darkmode ,the custom style will not applied. only apply dark mode. |
If we revert that, there will be glitches on linux & mac because the old custom .css isn't complete (only some styles are changed. If the user chooses another global qt theme, then some weird visual glitch will happen.). In other words: the struggles of those issues: goldendict/goldendict#719 They cannot figure out a nice solution because the old .css files only change some of the styles. To avoid those glitches: One path is to avoid theming UI elements as 587aad1 did. Another path is fully theming everything, but this approach's maintenance cost is too high. However, we can bring back those qt style sheets only for Windows. |
the glitches only occured when enabled dark mode. when dark mode is not enabled ,they should also work. |
I kind of confused.
is the screenshort taken when both darkmode and lignoes-blue been enabled? |
maybe the goal can be split into several steps: |
Linux users may use any color. The black background is only one of the possibilities. Check the screen below: I can install Green/Blue/Brown backgrounds, and they are not "dark". In fact, the Qt's style engine on Linux is replaceable, Such as Kvantum which uses SVG to theme Qt widgets, a theme is just a SVG picture. There is also QtCurve which is built on top of GTK so that Qt and GTK apps look exactly the same. The theme will be determined by the user's GTK theme. Thus, there is no concept of "dark theme" on Linux. So, I think the the best solution for Linux users is don't hard code any colours. Just don't touch the defaults unless necessary. |
Does this mean on linux the custom style can be removed? |
Yes, and we already removed them. We just bring them back to Windows Only. #272 |
when user choose a custom style ,the background is different in the following image
the above image is caused by removing the custom qt-* style.css.
This has caused some confusions. I think the combination of the darkmode ,darkreader,custom style should be considered more closely.
Such as :
1, put darkmode as a custom style in the dropdownlist(Windows only).
by this way,the darkmode will not conflict with custom style.
2, when user choose darkmode,
enable darkreader when the system has enabled darkmode.
darkreader can detect system darkmode.
https://github.com/darkreader/darkreader#:~:text=//%20Enable%20when%20the%20system%20color%20scheme%20is%20dark.%0ADarkReader.auto(%7B%0A%20%20%20%20brightness%3A%20100%2C%0A%20%20%20%20contrast%3A%2090%2C%0A%20%20%20%20sepia%3A%2010%0A%7D)%3B
The text was updated successfully, but these errors were encountered: