Skip to content
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

Reorganize bottom menu config panels #6131

Merged
merged 7 commits into from
May 7, 2020

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented May 7, 2020

Mostly for the PDF bottom menu. See #6122. Closes #6122.


This change is Reviewable

Mostly for the PDF bottom menu.
- Reorganize by topic, trying to limit the nb of widgets
  per panel to 4.
- Re-order some toggles from low to high ('off' then 'on').
- Show font size as number instead of a list of "Aa"
- PDF: add more font size values, and increase usable
  contrast values.
- Adds help_text to most PDF toggle titles.
@Frenzie Frenzie added this to the 2020.05 milestone May 7, 2020
@Frenzie Frenzie added the UX label May 7, 2020
@@ -129,6 +149,8 @@ local KoptOptions = {
end,
labels = {S.AUTO, S.LEFT, S.CENTER, S.RIGHT, S.JUSTIFY},
name_text_hold_callback = optionsutil.showValues,
help_text = _([[In reflow mode, sets the lines alignment.
Copy link
Member

Choose a reason for hiding this comment

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

I think you meant "lines' alignment" but I'm not sure if that's any clearer than just alignment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

text alignment then ? (avoid wondering if we align words (on a line) or the line itself)

default_value = 0,
advanced = true,
name_text_hold_callback = optionsutil.showValues,
help_text = _([[Force the use of OCR for text selection, even if the document has some text layer.]]),
Copy link
Member

Choose a reason for hiding this comment

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

You might be talking about something technical with multiple text layers or whatnot? But I think that just unnecessarily complicates things.

Suggested change
help_text = _([[Force the use of OCR for text selection, even if the document has some text layer.]]),
help_text = _([[Force the use of OCR for text selection, even if the document has a text layer.]]),

@@ -7,16 +7,16 @@ S.DUAL_PAGES = _("Dual Pages")
S.PAGE_CROP = _("Page Crop")
S.FULL_SCREEN = _("Full Screen")
S.ZOOM_DPI = _("Zoom (dpi)")
S.PAGE_MARGIN = _("Margin")
S.PAGE_MARGIN = _("Margins")
Copy link
Member

Choose a reason for hiding this comment

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

This change looks a bit suspicious, what's it about?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Asked you the question in #6122 (comment):

Now includes Margin (should it be plural?)

image
It is plural in cre:
image

Copy link
Member

Choose a reason for hiding this comment

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

I'd say that it shouldn't be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why?

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, margin is the four all at once (e.g., page margin), or a single one. Two/three of them (e.g., left & right margins) are plural.

Copy link
Member

Choose a reason for hiding this comment

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

Because it's just "the margin." As @NiLuJe wrote.

Copy link
Member

@Frenzie Frenzie May 7, 2020

Choose a reason for hiding this comment

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

"The margin of a written page is the empty space at the side of the page."

(There's empty space on all four sides.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allright, english has the right to be strange.
So, even when talking about its size, and not only as a general concept? The page margin is small ?

Copy link
Member

Choose a reason for hiding this comment

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

Yep!

name_text_hold_callback = optionsutil.showValues,
}
help_text = _([[Allows cutting out blank page margins in the original document.
Copy link
Member

@NiLuJe NiLuJe May 7, 2020

Choose a reason for hiding this comment

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

I'd keep using crop here, it should be common enough (i.e., cropping or cropping out instead of cutting) ;).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially went with "crop out", but Google tells me it's only used in "(of rock) appear or be exposed at the surface of the earth." :)
Thought cutting out might be an alternative explanation for people not used to "crop" (is that a technical word - or casual english word?)

Copy link
Member

Choose a reason for hiding this comment

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

That's an outcrop, yeah ;).

Cropping should be instantly recognizable by anyone who's ever done even the tiniest bit of image manipulation or photography.

Cropping allows you to crop something out.

And crop can be synonymous to cut in a number of contexts ;).

@@ -254,7 +254,7 @@ Note that your selected font size is not affected by this setting.]]),
more_options = true,
more_options_param = {
value_min = 70,
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't mind lowering this to 50, too ;p.

Copy link
Member

Choose a reason for hiding this comment

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

(I have a vague memory that Noto has insanely large line-gaps by default, and 70 was still pretty roomy. I may be misremembering :D).

Copy link
Member

@NiLuJe NiLuJe May 7, 2020

Choose a reason for hiding this comment

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

Okay, scratch that, I checked again w/ both Noto, and 70 is when ascenders and descenders start to meet, so, eh, fine by me at 70 ;).

Sorry for the noise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

Choose a reason for hiding this comment

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

(Can't hurt anyway, thanks!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, github comments lags.
Well, still keeping the 50, might be useful with some crappy large line height fonts.

@poire-z
Copy link
Contributor Author

poire-z commented May 7, 2020

Can I merge this this evening (and give some work to translators) - or should I wait a bit more?

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.

lgtm

@Frenzie
Copy link
Member

Frenzie commented May 7, 2020

@poire-z Let's get translation started ASAP, release shouldn't be too far off besides me not having written any release notes. :-)

@poire-z poire-z merged commit 8991540 into koreader:master May 7, 2020
@poire-z poire-z deleted the bottom_panel_reorg branch May 7, 2020 18:24
@poire-z
Copy link
Contributor Author

poire-z commented May 7, 2020

OK, and easier to spot typo or wording issues on the device than on GitHub.

@hius07
Copy link
Member

hius07 commented May 8, 2020

Can I reduce the font size of the info tips?
I would prefer the same size as the bottom menu items are.

@poire-z
Copy link
Contributor Author

poire-z commented May 8, 2020

Not without tweaking values in the code.
(It uses the same default font & size that most InfoMessages get - and InfoMessage will aditionally reduce it if the text would overflow the screen.)
But why? It's not something you would spent hours contemplating :)

@poire-z
Copy link
Contributor Author

poire-z commented May 8, 2020

Some unrelated question: should we normalize a bit more our top menus, and generalize the use of text_func for menu items with a list of selectable stuff as their submenu - or setable via some widget, to show the thing selected or set?

We have a few of them, with the thing shown in parenthesis or after a colon (should these be normalized too?)

Typography rules: French >
Font size (20)
Installed dictionaries (3/5) >
Back to exit (always) >
Previous: That so-so book.epub

Should we show:

Font: Noto Sans Devanagari UI >
Language: French >
Style: epub.css >
Highlight action: Translate >
Wikipedia languages: en fr ru
Screen DPI: Medium (160) >

Or that would make the menu more crowded and less readable - and it's desirable to not abuse that?

@Frenzie
Copy link
Member

Frenzie commented May 8, 2020

As a rule of thumb I'd say shorter is indeed better.

NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Jan 7, 2021
NiLuJe added a commit that referenced this pull request Jan 10, 2021
* Wherever possible, do an actual dumb invert on the Screen BB instead of repainting the widget, *then* inverting it (which is what the "invert" flag does).
* Instead of playing with nextTick/tickAfterNext delays, explicitly fence stuff with forceRePaint
* And, in the few cases where said Mk. 7 quirk kicks in, make the fences more marked by using a well-placed WAIT_FOR_UPDATE_COMPLETE

* Fix an issue in Button where show/hide & enable/disable where actually all toggles, which meant that duplicate calls or timing issues would do the wrong thing. (This broke dimming some icons, and mistakenly dropped the background from FM chevrons, for example).
* Speaking of, fix Button's hide/show to actually restore the background properly (there was a stupid typo in the variable name)
* Still in Button, fix the insanity of the double repaint on rounded buttons. Turns out it made sense, after all (and was related to said missing background, and bad interaction with invert & text with no background).
* KeyValuePage suffered from a similar issue with broken highlights (all black) because of missing backgrounds.
* In ConfigDialog, only instanciate IconButtons once (because every tab switch causes a full instantiation; and the initial display implies a full instanciation and an initial tab switch). Otherwise, both instances linger, and catch taps, and as such, double highlights.
* ConfigDialog: Restore the "don't repaint ReaderUI" when switching between similarly sized tabs (re #6131). I never could reproduce that on eInk, and I can't now on the emulator, so I'm assuming @poire-z fixed it during the swap to SVG icons.
* KeyValuePage: Only instanciate Buttons once (again, this is a widget that goes through a full init every page). Again, caused highlight/dimming issues because buttons were stacked.
* Menu: Ditto.
* TouchMenu: Now home of the gnarliest unhilight heuristics, because of the sheer amount of different things that can happen (and/or thanks to stuff not flagged covers_fullscreen properly ;p).

* Bump base
koreader/koreader-base#1280
koreader/koreader-base#1282
koreader/koreader-base#1283
koreader/koreader-base#1284

* Bump android-luajit-launcher
koreader/android-luajit-launcher#284
koreader/android-luajit-launcher#285
koreader/android-luajit-launcher#286
koreader/android-luajit-launcher#287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganize PDF bottom menu config panels
4 participants