Skip to content

Dict/Wiki results: add button to show list of results #10424

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

Merged
merged 5 commits into from
May 12, 2023

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented May 11, 2023

Discussed all along #10304. Closes #10304.

TextBoxWidget:getFontSizeToFitHeight(): allow for more accuracy

By providing the font that will be used. As it's more expensive, use only when really needed.

Button: fix unstable height

The final height of a button could be different whether a smaller font size or multiline end up being used.
Also fix 2-lines logical error making it less favored.
Also forward any lang property to the underlying text widgets.

ScrollableContainer: add support for step/grid scrolling

When the containee is row-based, this can ensure that when scrolling with swipes, we get the a full row at top, and that any truncated row at top or bottom is fully visible after a swipe.

ButtonDialog: allow for step/page scrolling

With tall ButtonDialog with many rows, allows for a more natural and readable scrolling without any truncated row (like in Excel, we previously behave as web browsers).

ButtonTable:

  • make the span and separator layout more explicite
  • add some small horizontal padding when button text is centered

DictQuickLookup: add button to show list of results

Add a left button to the title bar to show the list of results as a popup.
Dictionary: tap or long-press on that button give different view of the results.
Wikipedia: request 30 results instead of 20, so we can show 15, 10 or 6 of them per page of that popup

image

image

image


This change is Reviewable

poire-z added 2 commits May 11, 2023 21:00
By providing the font that will be used.
As it's more expensive, use only when really needed.
The final height of a button could be different whether
a smaller font size or multiline end up being used.
Also fix 2-lines logical error making it less favored.
Also forward any lang property to the underlying text widgets.
poire-z added 3 commits May 11, 2023 21:11
When the containee is row-based, this can ensure that when
scrolling with swipes, we get the a full row at top, and
that any truncated row at top or bottom is fully visible
after a swipe.
With tall ButtonDialog with many rows, allows for a more
natural and readable scrolling without any truncated row
(like in Excel, we previously behave as web browsers).

ButtonTable:
- make the span and separator layout more explicite
- add some small horizontal padding when button text
  is centered
Add a left button to the title bar to show the list
of results as a popup.
Dictionary: tap or long-press on that button give
different view of the results.
Wikipedia: request 30 results instead of 20, so we
can show 15, 10 or 6 of them per page of that popup.
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I like the button height changes even if it was a bug. :-)

@poire-z poire-z merged commit fc81c7d into koreader:master May 12, 2023
@poire-z poire-z deleted the dict_popups branch May 12, 2023 18:12
@poire-z poire-z added this to the 2023.05 milestone May 12, 2023
@hius07 hius07 mentioned this pull request Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Overview screen for dictionary look-up tool
2 participants