plateaukao / einkbro

A small, fast web browser based on Android WebView. It's tailored for E-Ink devices but also works great on normal android devices.
Other
1.05k stars 77 forks source link

feat: allow to set page reserved height in percents #314

Closed mxmgorin closed 6 months ago

mxmgorin commented 6 months ago

Issue: Screens have more pixels in height than in width so when offset in pixels there is a difference in scrolling on different orientations. Also it is a little bit hard to remember screen resolution in pixels and requires a few tries to get desired offset.

Solution: Allow to input '%' character in 'Page reserved height' field for the automatic offset calculation by screen height, otherwise use pixels as before.

mxmgorin commented 6 months ago

Hello, @plateaukao What do you think? If you have any suggestions for the implementation I would like to change and contribute. I saw you have mentioned it and I also think it is useful feature - I use onyx boox palma and really miss it.

plateaukao commented 6 months ago

Hi, @mxmgorin

Thanks for sending this pull request. I'll merge it when I have time. In your PR, it does not consider people who have already set up height in integer; that might crash their app. I'll merge your pr and modify the logic to check original value and use it if it exists.