vedgy / goldendict

A feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained, and allowing you to type in words without any accents or correct case.
http://goldendict.org/
Other
7 stars 3 forks source link

[support] custom styling #3

Closed omega3 closed 1 year ago

omega3 commented 1 year ago

Is it possible to apply any custom styling css to your fork or Dark Mode?

vedgy commented 1 year ago

Styling works in exactly the same way as in GoldenDict master, except for a small change described in this comment.

Other than that, these dark theme instructions should work.

If you want to make the dark theme available without any custom steps, please contribute a pull request to the main GoldenDict repository. I think a good dark theme pull request is very likely to be merged. Then I'll adapt #1542 to the changes in GoldenDict master.

omega3 commented 1 year ago

I am sorry but I am not a coder. I don't have such skills. I tested linked theme and followed instructions and it doesn't work. There is no: Open GoldenDict menu "Preferences... → Interface": set "Add-on style" to dark-theme; in this version.

vedgy commented 1 year ago

The instructions work in my goldendict-webengine-pr-git version (slightly customized with my other PRs not related to themes):

dark-theme

The Add-on style combobox appears at the bottom of the Interface tab only after the css files are placed into $GD_HOME_DIR/styles/dark-theme/

My system theme is light, so the interface is not entirely dark. And MediaWiki styling is incomplete (probably fixable in the dark theme's css files).

By the way, the file qt-style.css can also be placed in styles/dark-theme/ to let the user switch between addons and built-in themes easier and be able to override some settings in $GD_HOME_DIR/qt-style.css, not only $GD_HOME_DIR/article-style.css. I'll edit the dark theme wiki page with this improvement.

omega3 commented 1 year ago

I see. I had the wrong path. I placed css files in /home/user/.config/goldendict/styles/dark-theme/ instead of the path you gave. Now it works. Thank you very much.

vedgy commented 1 year ago

The path ~/.config/goldendict is a new alternative to the old ~/.goldendict. If you rename ~/.goldendict to something else and restart GoldenDict, ~/.config/goldendict, ~/.cache/goldendict/index, ~/.local/share/goldendict will be used. See #1411.