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
Add an option to avoid auto-scrolling out of top dictionary #1114
base: master
Are you sure you want to change the base?
Add an option to avoid auto-scrolling out of top dictionary #1114
Conversation
After enabling this option, sometimes I do want to auto-scroll to the target dictionary. This could be addressed by adding a shortcut that scrolls to the current "scrollto" target. This way, when this option is on, auto-scrolling won't happen, but the user could trigger the scrolling manually (via the new shortcut) at any time. |
1d97f74
to
036df2b
Compare
Added the Alt+T shortcut that scrolls to the current "scrollto" target as described above. Also inverted the option's meaning along with its default value for better clarity (the behavior is still not changed by default, until the user toggles the new option). |
when will this be merged ,I need features like this. |
handled in this xiaoyifang/goldendict-ng#9 |
@Abs62, three users expressed interest in this optional feature:
I think it would be useful for many more users who just haven't stumbled upon this pull request. Could you please review it? |
|
f4f0ae8
to
036df2b
Compare
When a user clicks on a link in a dictionary or requests translation of a word by double-clicking or translates selection via the context menu, at first the article from the highest-priority dictionary is at the top. Then, after approximately one second, the article from the dictionary, out of which the translation was requested, becomes current and the view scrolls down to this article placing it on top, hiding articles from the dictionaries above it. Such application behavior is inconvenient in some workflows so that the user manually navigates to the top dictionary translation when this automatic scrolling happens. For example: a user has English->Russian dictionaries and English->English dictionaries. The English->Russian dictionaries are higher up in the dictionary order because they provide easier/faster to understand translations. Some rare words and phrases are missing from the English->Russian dictionaries however. Thus the user occasionally reads the English explanation of a word/phrase. When the user double-clicks on a word or follows a link in the English->English dictionary article, she would rather see translations from the preferable English->Russian dictionaries. The new option allows to disable automatic scrolling and ensure that articles from higher-priority dictionaries are visible. The option doesn't affect backward/forward navigation via arrow buttons or Alt+Arrow shortcuts: these still scroll to the stored vertical position among articles. This remaining automatic scrolling happens much faster, is not a problem for the described use case and hopefully for other use cases.
This new action is particularly useful when the "Automatically scroll to target article" option is disabled. Even if the user prefers translations from higher-priority dictionaries most of the time, sometimes she may want to read the target article. This action allows to quickly scroll to the target article via its Alt+T shortcut.
b365bbe
to
6d53199
Compare
Rebased on master and added the |
When a user clicks a link in a dictionary or requests translation of
a word by double-clicking or translates selection via the context menu,
the definition in all dictionaries is displayed. Then the article from
the dictionary, out of which the translation was requested, becomes
current and the view scrolls down to this article placing it on top,
hiding translations from dictionaries above it.
This behavior is inconvenient in some workflows and forces the user to
manually navigate to the top dictionary translation each time this
auto-scrolling happens.
For example: a user has English->Russian dictionaries and
English->English dictionaries. The English->Russian dictionaries are
higher up in the dictionary order because they provide easier/faster to
understand translations. Some rare words and phrases are missing from
the English->Russian dictionaries however. So the user has to read the
English explanation of the word/phrase. When the user double-clicks a
word or follows a link in the English->English dictionary article, she
would rather see translations from the preferable English->Russian
dictionaries.
The new option allows to disable auto-scrolling and ensure that articles
from higher-priority dictionaries are visible. The option doesn't affect
backward/forward navigation via arrow buttons or Alt+Arrow shortcuts:
these still scroll to the stored vertical position among articles. This
remaining auto-scrolling is not a problem for the described use case and
hopefully for other potential use cases.