-
Notifications
You must be signed in to change notification settings - Fork 49
Improve popup dictionary styling #220
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
Comments
All three of these options are desirable, though I like rendering them inline with brackets the least since it gets in the way of readability. Tooltips can be implemented in a hacky way by making tooltip'd text a link and using
By links, do you mean clicking a word opens a sub-search of sorts? I'm not against the idea. Opening it in a new popup would be the easiest thing to do since recursive search is already supported. You'd just have to listen for
Memento is older than Yomitan by several years. Yomitan has changed Yomichan's dictionaries quite a lot, which Memento hasn't kept up with. Very few of Yomichan's dictionaries used structured content, instead opting for plaintext. Most dictionaries used I believe the choice is mostly left to the dictionary if it's using structured content. These settings have an outsized effect on plaintext dictionaries. If I didn't comment on something, it's because I'm okay with the change/improvement. If you want to work on some of them and make PR's, by all means go ahead. |
Structured content allows dictionaries to specify <a> tags which can be either sub-search or links to external websites. Yomitan uses the same popup, but I have no issues with the way Memento currently opens a new popup for recursive search. The structured content format looks like this
|
Makes sense to me. I'd say reuse the code for recursive search since that's going to be really easy. |
I'm not able to do anymore work on this for the foreseeable future. I'll post what I've done so far in case it's useful. I've added
The approach uses flow layout for most of the changes. There are some layout issues with this method that I don't think can be completely eliminated, so I'm not really satisfied with it. The fundamental problem is that the html subset used by QLabels is extremely limited and makes it difficult to do proper layout. Had time allowed, I had planned to evaluate the feasibility of litehtml (html+css engine with no renderer included) to do all the layout work and render either each term widget as a html document or the entire definition widget as a html document. The main potential issues I foresaw was performance and licensing. Litehtml is BSD-3 and there are qt bindings here licensed under LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0. |
Thanks for the work you've done. I'll look into integrating what you have. |
I'd like to see make improvements to Memento's dictionary definition display to bring it more in line with Yomitan. More specifically, I would like to see proper support for Yomichan's compact glossaries, compact tags and better support for structured-content dictionary data. This includes quite a few separate changes:
This is partially related to anki styling #213 as many of these points also apply, but because Qt and Anki html rendering have very different capabilities, it seems appropriate they should be handled separately.
Example of yomitan and memento side by side for JMDict and Jitendex
I can have a go at making a pull request if you're interested.
The text was updated successfully, but these errors were encountered: