-
-
Notifications
You must be signed in to change notification settings - Fork 70
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 extra padding for zoomed in web pages #887
base: main
Are you sure you want to change the base?
Conversation
I don't think this is a good idea at all to modify the css or dom. Why do we do that? |
This was the implementation of the "page zoom" functionality. |
@BPerlakiH There should be some kind of zoom provided by the html widget itself |
We have the default pinch gesture to zoom: pinch_to_zoom.mov |
pinch is not what we need or talk about here! |
We have the "magnify" option for the webView, but that zooms in a similar fashion as the pinch zoom, making the letters relatively larger, but you need to scroll horizontally as well to read it. |
db471aa
to
ec3de16
Compare
ec3de16
to
7ea2776
Compare
7ea2776
to
b6ac11d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
- Coverage 40.00% 39.96% -0.05%
==========================================
Files 108 109 +1
Lines 6186 6193 +7
==========================================
Hits 2475 2475
- Misses 3711 3718 +7 ☔ View full report in Codecov by Sentry. |
Converted to draft, as it's a stale PR / issue. |
Fixes: #885
Origin
I have found the zoom functionality is applying a JS callback to adjust the CSS values of the page:
kiwix-apple/Views/BuildingBlocks/WebView.swift
Lines 213 to 220 in c0539cc
Proposed solution
I tried adjustments on the the swift view level, but that did not look good.
Therefore, I am proposing to adjust the webkit padding in a similar fashion as the text size increase is done for zooming in.
As of my testing it looks good on all devices (iPhone, iPad, macOS).